Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,9 +1,16 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
demo = gr.Interface(
|
| 4 |
-
fn=
|
| 5 |
-
inputs="
|
| 6 |
-
outputs="
|
|
|
|
|
|
|
| 7 |
)
|
| 8 |
|
| 9 |
-
|
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
+
def simple_function(name):
|
| 4 |
+
return f"Hello {name}! This is Gradio 4.x"
|
| 5 |
+
|
| 6 |
+
# Gradio 4.x Interface
|
| 7 |
demo = gr.Interface(
|
| 8 |
+
fn=simple_function,
|
| 9 |
+
inputs=gr.Textbox(label="Your Name", placeholder="Enter your name here"),
|
| 10 |
+
outputs=gr.Textbox(label="Response"),
|
| 11 |
+
title="Gradio 4.x Test",
|
| 12 |
+
description="Testing if Gradio 4.x works properly"
|
| 13 |
)
|
| 14 |
|
| 15 |
+
if __name__ == "__main__":
|
| 16 |
+
demo.launch()
|