Download run.py from gradio/interface_with_additional_inputs_main: direct link, hf CLI and curl.
- Browser
- Download file 403 Bytes
-
https://huggingface.co/spaces/gradio/interface_with_additional_inputs_main/resolve/0e91e8f2ea35a8757802e796b268f55bbf00a7b2/run.py
- Command line
-
hf download hf://spaces/gradio/interface_with_additional_inputs_main@0e91e8f2ea35a8757802e796b268f55bbf00a7b2/run.py
-
curl -L -o run.py https://huggingface.co/spaces/gradio/interface_with_additional_inputs_main/resolve/0e91e8f2ea35a8757802e796b268f55bbf00a7b2/run.py
403 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" | |
| ], | |
| api_name="predict", | |
| ) | |
| if __name__ == "__main__": | |
| demo.launch() | |