Spaces:
Sleeping
Sleeping
Upload 3 files
Browse files
app.py
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
from gtts import gTTS
|
| 2 |
import tempfile
|
| 3 |
import json
|
|
@@ -338,8 +342,7 @@ emotions = {
|
|
| 338 |
"tension headache" : "Massage your temples gently.",
|
| 339 |
"mind storm" : "Sit quietly and focus on one thought.",
|
| 340 |
"mental struggle" : "Write a small gratitude note.",
|
| 341 |
-
"mind fatigue" : "Do light stretches or walk for 5 minutes."
|
| 342 |
-
"boyfriend": "love can be tricky. Wanna talk about it?"
|
| 343 |
}
|
| 344 |
|
| 345 |
# Functions
|
|
@@ -447,7 +450,7 @@ with gr.Blocks() as app:
|
|
| 447 |
age = gr.Textbox(label="Age")
|
| 448 |
gender = gr.Dropdown(["Male", "Female", "Other"], label="Gender")
|
| 449 |
language = gr.Dropdown(list(lang_codes.keys()), label="Preferred Language")
|
| 450 |
-
Guardian_info = gr.Textbox(label="
|
| 451 |
btn = gr.Button("Save Info")
|
| 452 |
popup = gr.Markdown(visible=False, elem_classes="alert-box")
|
| 453 |
btn.click(set_personal_info, [name, age, gender, language,Guardian_info], [popup, popup])
|
|
|
|
| 1 |
+
add a btn of go to next tab code in the following code rest should be unchnged
|
| 2 |
+
|
| 3 |
+
add in this bro
|
| 4 |
+
|
| 5 |
from gtts import gTTS
|
| 6 |
import tempfile
|
| 7 |
import json
|
|
|
|
| 342 |
"tension headache" : "Massage your temples gently.",
|
| 343 |
"mind storm" : "Sit quietly and focus on one thought.",
|
| 344 |
"mental struggle" : "Write a small gratitude note.",
|
| 345 |
+
"mind fatigue" : "Do light stretches or walk for 5 minutes."
|
|
|
|
| 346 |
}
|
| 347 |
|
| 348 |
# Functions
|
|
|
|
| 450 |
age = gr.Textbox(label="Age")
|
| 451 |
gender = gr.Dropdown(["Male", "Female", "Other"], label="Gender")
|
| 452 |
language = gr.Dropdown(list(lang_codes.keys()), label="Preferred Language")
|
| 453 |
+
Guardian_info = gr.Textbox(label="Name")
|
| 454 |
btn = gr.Button("Save Info")
|
| 455 |
popup = gr.Markdown(visible=False, elem_classes="alert-box")
|
| 456 |
btn.click(set_personal_info, [name, age, gender, language,Guardian_info], [popup, popup])
|