Update app.py
Browse files
app.py
CHANGED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
|
| 3 |
+
def greet(name):
|
| 4 |
+
return f"Hey {name}! Welcome to Simar's Space 👋"
|
| 5 |
+
|
| 6 |
+
with gr.Blocks() as demo:
|
| 7 |
+
gr.Markdown("# Hi, I'm Simar 👋\n"
|
| 8 |
+
"Welcome to my Hugging Face Space where I build cool AI demos and projects.\n\n"
|
| 9 |
+
"## ⚙️ Skills & Tools\n"
|
| 10 |
+
"- Python, JavaScript, HTML/CSS\n"
|
| 11 |
+
"- Hugging Face Spaces, Gradio\n"
|
| 12 |
+
"- Machine Learning basics\n"
|
| 13 |
+
"- Git & GitHub\n\n"
|
| 14 |
+
"## 🚀 Demo\n"
|
| 15 |
+
"Try the greeting below!")
|
| 16 |
+
|
| 17 |
+
name_input = gr.Textbox(label="Enter your name")
|
| 18 |
+
greet_button = gr.Button("Greet me!")
|
| 19 |
+
output = gr.Textbox(label="Greeting")
|
| 20 |
+
|
| 21 |
+
greet_button.click(greet, inputs=name_input, outputs=output)
|
| 22 |
+
|
| 23 |
+
gr.Markdown("## Connect with me\n"
|
| 24 |
+
"[GitHub](https://github.com/simar007) | "
|
| 25 |
+
"[LinkedIn](https://linkedin.com/in/simar007) | "
|
| 26 |
+
"[Twitter](https://twitter.com/simar007)")
|
| 27 |
+
|
| 28 |
+
demo.launch()
|