Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -100,7 +100,7 @@ for model_name, model_obj in models.items():
|
|
100 |
acc = accuracy_score(y_test, y_pred) # Calculate accuracy
|
101 |
trained_models[model_name] = {'model': model_obj, 'accuracy': acc}
|
102 |
|
103 |
-
# Helper Functions for Chatbot
|
104 |
def bag_of_words(s, words):
|
105 |
"""Convert user input to bag-of-words vector."""
|
106 |
bag = [0] * len(words)
|
@@ -258,7 +258,6 @@ def predict_disease(symptoms):
|
|
258 |
|
259 |
return "\n".join(markdown_output)
|
260 |
|
261 |
-
# Gradio Application Interface
|
262 |
# Gradio Application Interface
|
263 |
with gr.Blocks() as app:
|
264 |
gr.HTML("<h1>🌟 Well-Being Companion</h1>")
|
@@ -271,7 +270,7 @@ with gr.Blocks() as app:
|
|
271 |
|
272 |
theme_dropdown = gr.Dropdown(choices=themes, label="Select Theme")
|
273 |
|
274 |
-
toggle_dark = gr.Button(value="Toggle Dark", scale=1)
|
275 |
|
276 |
# Theme changing logic
|
277 |
theme_dropdown.change(
|
|
|
100 |
acc = accuracy_score(y_test, y_pred) # Calculate accuracy
|
101 |
trained_models[model_name] = {'model': model_obj, 'accuracy': acc}
|
102 |
|
103 |
+
# Helper Functions for Chatbot
|
104 |
def bag_of_words(s, words):
|
105 |
"""Convert user input to bag-of-words vector."""
|
106 |
bag = [0] * len(words)
|
|
|
258 |
|
259 |
return "\n".join(markdown_output)
|
260 |
|
|
|
261 |
# Gradio Application Interface
|
262 |
with gr.Blocks() as app:
|
263 |
gr.HTML("<h1>🌟 Well-Being Companion</h1>")
|
|
|
270 |
|
271 |
theme_dropdown = gr.Dropdown(choices=themes, label="Select Theme")
|
272 |
|
273 |
+
toggle_dark = gr.Button(value="Toggle Dark", scale=1)
|
274 |
|
275 |
# Theme changing logic
|
276 |
theme_dropdown.change(
|