Spaces:
Runtime error
Runtime error
created a sample app
Browse files- app.py +14 -0
- requirements.txt +1 -0
app.py
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
|
| 3 |
+
def greet(name: str) -> str:
|
| 4 |
+
""" Function that takes a name and returns a greeting """
|
| 5 |
+
return f"Hello {name}!"
|
| 6 |
+
|
| 7 |
+
# Create the Gradio interface
|
| 8 |
+
interface = gr.Interface(fn=greet,
|
| 9 |
+
inputs=gr.inputs.Textbox(lines=2, placeholder="Type your name..."),
|
| 10 |
+
outputs="text")
|
| 11 |
+
|
| 12 |
+
# Launch the app
|
| 13 |
+
interface.launch()
|
| 14 |
+
|
requirements.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
gradio
|