Spaces:
Sleeping
Sleeping
Download interface_with_additional_inputs.py from mmcc007/gradio_experiments: direct link, hf CLI and curl.
- Browser
- Download file 348 Bytes
-
https://huggingface.co/spaces/mmcc007/gradio_experiments/resolve/main/interface_with_additional_inputs.py
- Command line
-
hf download hf://spaces/mmcc007/gradio_experiments/interface_with_additional_inputs.py
-
curl -L -o interface_with_additional_inputs.py https://huggingface.co/spaces/mmcc007/gradio_experiments/resolve/main/interface_with_additional_inputs.py
348 Bytes
| import gradio as gr | |
| def generate_fake_image(prompt, seed, initial_image=None): | |
| return f"Used seed: {seed}", "https://dummyimage.com/300/09f.png" | |
| demo = gr.Interface( | |
| generate_fake_image, | |
| inputs=["textbox"], | |
| outputs=["textbox", "image"], | |
| additional_inputs=[ | |
| gr.Slider(0, 1000), | |
| "image" | |
| ] | |
| ) | |
| demo.launch() | |