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

**URL:** <https://discuss.huggingface.co/t/attributeerror-module-gradio-has-no-attribute-image/23737>\
**Category:** 🔒 Gradio\
**Created:** [September 28, 2022, 4:49pm UTC](https://discuss.huggingface.co/t/attributeerror-module-gradio-has-no-attribute-image/23737 "2022-09-28T16:49:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nightfury](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/nightfury/32/39775_2.png) [@nightfury](https://discuss.huggingface.co/u/nightfury)\
**Post date:** [September 28, 2022, 4:49pm UTC](https://discuss.huggingface.co/t/attributeerror-module-gradio-has-no-attribute-image/23737/1 "2022-09-28T16:49:24Z")

</div>

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/script\_runner.py”, line 554, in \_run\_script  
exec(code, module.dict)  
File “/home/user/app/app.py”, 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

[https://huggingface.co/spaces/nightfury/StableDiffusion-Img2Img/raw/main/app.py](https://huggingface.co/spaces/nightfury/StableDiffusion-Img2Img/raw/main/app.py)

---

<div class="post-metadata">

**Author:** ![freddyaboulton](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/freddyaboulton/32/32732_2.png) [@freddyaboulton](https://discuss.huggingface.co/u/freddyaboulton)\
**Post date:** [September 28, 2022, 5:02pm UTC](https://discuss.huggingface.co/t/attributeerror-module-gradio-has-no-attribute-image/23737/2 "2022-09-28T17:02:42Z")

</div>

Hi @nightfury !

That space is actually a streamlit sdk: [README.md · nightfury/StableDiffusion-Img2Img at main](https://huggingface.co/spaces/nightfury/StableDiffusion-Img2Img/blob/main/README.md#L6)

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.

---

<div class="post-metadata">

**Author:** ![nightfury](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/nightfury/32/39775_2.png) [@nightfury](https://discuss.huggingface.co/u/nightfury)\
**Post date:** [September 29, 2022, 8:54am UTC](https://discuss.huggingface.co/t/attributeerror-module-gradio-has-no-attribute-image/23737/3 "2022-09-29T08:54:42Z")

</div>

ohh i see.  
…  
That worked. Thank you.

---

<div class="post-metadata">

**Author:** ![nightfury](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/nightfury/32/39775_2.png) [@nightfury](https://discuss.huggingface.co/u/nightfury)\
**Post date:** [September 29, 2022, 9:02am UTC](https://discuss.huggingface.co/t/attributeerror-module-gradio-has-no-attribute-image/23737/4 "2022-09-29T09:02:48Z")

</div>

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
