Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -258,33 +258,25 @@ def predict_disease(symptoms):
|
|
258 |
return "\n".join(markdown_output)
|
259 |
|
260 |
# Gradio Application Interface
|
261 |
-
with gr.Blocks() as app:
|
262 |
gr.HTML("<h1>🌟 Well-Being Companion</h1>")
|
263 |
|
264 |
# Theme Dropdown
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
themeElem.rel = 'stylesheet';
|
274 |
-
themeElem.href = '/themes/' + theme + '.css'; // Path to the theme CSS files
|
275 |
-
document.head.appendChild(themeElem);
|
276 |
-
}}
|
277 |
-
"""
|
278 |
-
|
279 |
-
theme_dropdown.change(update_theme, inputs=theme_dropdown, outputs=[])
|
280 |
-
|
281 |
toggle_dark = gr.Button(value="Toggle Dark", scale=1)
|
282 |
|
283 |
-
#
|
284 |
-
def toggle_dark_mode():
|
285 |
-
return "dark" if "
|
286 |
|
287 |
-
toggle_dark.click(toggle_dark_mode, None,
|
288 |
|
289 |
with gr.Tab("Well-Being Chatbot"):
|
290 |
with gr.Row():
|
|
|
258 |
return "\n".join(markdown_output)
|
259 |
|
260 |
# Gradio Application Interface
|
261 |
+
with gr.Blocks(theme='shivi/calm_seafoam') as app: # Set theme here
|
262 |
gr.HTML("<h1>🌟 Well-Being Companion</h1>")
|
263 |
|
264 |
# Theme Dropdown
|
265 |
+
themes = [
|
266 |
+
"calm_seafoam",
|
267 |
+
"Ranko_test"
|
268 |
+
]
|
269 |
+
|
270 |
+
theme_dropdown = gr.Dropdown(choices=themes, label="Select Theme")
|
271 |
+
|
272 |
+
# Button to toggle dark mode
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
273 |
toggle_dark = gr.Button(value="Toggle Dark", scale=1)
|
274 |
|
275 |
+
# Function to switch to dark mode
|
276 |
+
def toggle_dark_mode(dark_mode):
|
277 |
+
return "dark" if dark_mode == "light" else "light"
|
278 |
|
279 |
+
toggle_dark.click(toggle_dark_mode, inputs=None, outputs=None) # Update this as you wish
|
280 |
|
281 |
with gr.Tab("Well-Being Chatbot"):
|
282 |
with gr.Row():
|