Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -2,13 +2,18 @@ import gradio as gr
|
|
2 |
|
3 |
def greet(feel):
|
4 |
if feel.lower() == "yes":
|
5 |
-
return "
|
6 |
elif feel.lower() == "no":
|
7 |
-
return "
|
8 |
else:
|
9 |
-
return "
|
10 |
|
11 |
-
demo = gr.Interface(
|
12 |
-
|
13 |
-
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
def greet(feel):
|
4 |
if feel.lower() == "yes":
|
5 |
+
return "I'm glad to hear that! Keep up the positivity!"
|
6 |
elif feel.lower() == "no":
|
7 |
+
return "I'm sorry to hear that. I hope things get better soon."
|
8 |
else:
|
9 |
+
return "Please select a valid option to proceed."
|
10 |
|
11 |
+
demo = gr.Interface(
|
12 |
+
fn=greet,
|
13 |
+
description="Please select if you are happy or not.",
|
14 |
+
title="Happiness Checker",
|
15 |
+
inputs=gr.inputs.Radio(["Yes", "No"], label="Are you happy?"),
|
16 |
+
outputs="text"
|
17 |
+
)
|
18 |
+
|
19 |
+
demo.launch()
|