runtime error
Exit code: 1. Reason: ples utils.synchronize_async(examples_obj.create) File "/usr/local/lib/python3.10/site-packages/gradio/utils.py", line 403, in synchronize_async return fsspec.asyn.sync(fsspec.asyn.get_loop(), func, *args, **kwargs) File "/usr/local/lib/python3.10/site-packages/fsspec/asyn.py", line 103, in sync raise return_result File "/usr/local/lib/python3.10/site-packages/fsspec/asyn.py", line 56, in _runner result[0] = await coro File "/usr/local/lib/python3.10/site-packages/gradio/helpers.py", line 273, in create await self.cache() File "/usr/local/lib/python3.10/site-packages/gradio/helpers.py", line 308, in cache prediction = await Context.root_block.process_api( File "/usr/local/lib/python3.10/site-packages/gradio/blocks.py", line 1012, in process_api result = await self.call_function( File "/usr/local/lib/python3.10/site-packages/gradio/blocks.py", line 830, in call_function prediction = await anyio.to_thread.run_sync( File "/usr/local/lib/python3.10/site-packages/anyio/to_thread.py", line 33, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread return await future File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 807, in run result = context.run(func, *args) File "/home/user/app/app.py", line 31, in predict img = effnetb2_transforms(img).unsqueeze(dim = 0) # unsqueeze = add batch dimension on 0th index. File "/usr/local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "/usr/local/lib/python3.10/site-packages/torchvision/transforms/_presets.py", line 59, in forward img = F.pil_to_tensor(img) File "/usr/local/lib/python3.10/site-packages/torchvision/transforms/functional.py", line 205, in pil_to_tensor img = torch.as_tensor(np.array(pic, copy=True)) RuntimeError: Could not infer dtype of numpy.uint8
Container logs:
Fetching error logs...