Spaces:
Running
Running
Download app.py from Nekomi2/hello-world: direct link, hf CLI and curl.
- Browser
- Download file 846 Bytes
-
https://huggingface.co/spaces/Nekomi2/hello-world/resolve/main/app.py
- Command line
-
hf download hf://spaces/Nekomi2/hello-world/app.py
-
curl -L -o app.py https://huggingface.co/spaces/Nekomi2/hello-world/resolve/main/app.py
846 Bytes
| # -*- coding: utf-8 -*- | |
| """GRADIO: Hello World.ipynb | |
| Automatically generated by Colaboratory. | |
| Original file is located at | |
| https://colab.research.google.com/drive/18ODkJvyxHutTN0P5APWyGFO_xwNcgHDZ | |
| ## Using Gradio to create a simple interface. | |
| Check out the library on [github](https://github.com/gradio-app/gradio-UI) and see the [getting started](https://gradio.app/getting_started.html) page for more demos. | |
| We'll start with a basic function that greets an input name. | |
| """ | |
| def greet(name): | |
| return "Hello " + name + "!" | |
| greet("World") | |
| """Now we'll wrap this function with a Gradio interface.""" | |
| import gradio | |
| gradio.Interface(greet, "text", "text").launch() | |
| """That's all! Go ahead and open that share link in a new tab. Check out our [getting started](https://gradio.app/getting_started.html) page for more complicated demos.""" |