hello-world / app.py
Nekomi2's picture
Upload app.py with huggingface_hub
f35d5d0
raw
history blame
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."""