AttributeError: module 'gradio' has no attribute 'Image'

2022-09-28 15:22:25.705 Uncaught app exception
Traceback (most recent call last):
File “/home/user/.local/lib/python3.8/site-packages/streamlit/scriptrunner/”, line 554, in _run_script
exec(code, module.dict)
File “/home/user/app/”, line 33, in
gr.Interface(fn=infer, inputs=[gr.Image(source=“upload”, type=“filepath”, label=“Raw Image”), gr.Textbox(label = ‘Prompt Input Text’),
AttributeError: module ‘gradio’ has no attribute ‘Image’

Please help with above Error

Hi @nightfury !

That space is actually a streamlit sdk: · nightfury/StableDiffusion-Img2Img at main

If you intend to use gradio, can you modify the README so that sdk_name is gradio and sdk_version is 3.4?

Hopefully that fixes the problem.

1 Like

ohh i see.

That worked. Thank you.

Do you know where to set set it sharable as a public link:-
‘To create a public link, set share=True in launch().’

&… you might know during build process it downloads around 16 files in backgroud at the server side… is there any way to stop & point to already downloaded files… may be those all are trained algo files which infact the google Colab also downloads while at build.
so is their any way to point that in a way… ‘hey the files you needed has already been downloaded…’ including library files with satisfied versions.
cause it takes a huge time, data, & gpu/cpu.

& where to add license details at later stage after space has been created