App.py
Browse filesgit add app.py requirements.txt
git commit -m "Initial Gradio app setup"
git push
app.py
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
|
3 |
+
def greet(name):
|
4 |
+
return f"Hello, {name}! Welcome to your Gradio app."
|
5 |
+
|
6 |
+
demo = gr.Interface(
|
7 |
+
fn=greet,
|
8 |
+
inputs=gr.Textbox(label="Enter your name"),
|
9 |
+
outputs=gr.Textbox(label="Greeting"),
|
10 |
+
title="Gradio Greeting App",
|
11 |
+
description="This app greets you with a personalized message."
|
12 |
+
)
|
13 |
+
|
14 |
+
if __name__ == "__main__":
|
15 |
+
demo.launch()
|
16 |
+
|