add image loading

#2
by Tonic - opened
Owner
===== Application Startup at 2024-09-12 10:06:37 =====


ZeroGPU tensors packing: 0.00B [00:00, ?B/s]
ZeroGPU tensors packing: 0.00B [00:00, ?B/s]
Running on local URL:  http://0.0.0.0:7860

To create a public link, set `share=True` in `launch()`.
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/gradio/queueing.py", line 536, in process_events
    response = await route_utils.call_process_api(
  File "/usr/local/lib/python3.10/site-packages/gradio/route_utils.py", line 322, in call_process_api
    output = await app.get_blocks().process_api(
  File "/usr/local/lib/python3.10/site-packages/gradio/blocks.py", line 1931, in process_api
    inputs = await self.preprocess_data(
  File "/usr/local/lib/python3.10/site-packages/gradio/blocks.py", line 1662, in preprocess_data
    processed_input.append(block.preprocess(inputs_cached))
  File "/usr/local/lib/python3.10/site-packages/gradio/components/image.py", line 190, in preprocess
    im = PIL.Image.open(file_path)
  File "/usr/local/lib/python3.10/site-packages/PIL/Image.py", line 3431, in open
    fp = builtins.open(filename, "rb")
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/gradio/54d120aa294ad38a7092c929c082fcfe667a70726756549e0b3d660b8f13773e/378547.jpeg'

@not-lain hey can you please help me with image loading using your library ?

Hi @Tonic
the traceback does not specify where load_img has been used exactly, so could you reference the commit hash here ?
also, I'm not so sure but my hypothesis is that the path '/tmp/gradio/54d120aa294ad38a7092c929c082fcfe667a70726756549e0b3d660b8f13773e/378547.jpeg' has like an extra / at the end which is the reason why it's broken, but this would need further investigation.

Tonic changed discussion status to closed
Owner

btw, load_img fixed this , while i was using it :-)

Sign up or log in to comment