Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -143,7 +143,7 @@ def respond(
|
|
| 143 |
yield "", updated_history
|
| 144 |
|
| 145 |
# Initialize customizable custom-themed layout frame
|
| 146 |
-
with gr.Blocks
|
| 147 |
|
| 148 |
# Top Control and Info Strip
|
| 149 |
with gr.Row():
|
|
@@ -155,7 +155,8 @@ with gr.Blocks(css=CUSTOM_CSS, theme=gr.themes.Soft()) as demo:
|
|
| 155 |
theme_toggle = gr.Button("🌙 Dark Mode", elem_classes=["toggle-btn"])
|
| 156 |
|
| 157 |
# Automatically refresh time indicator string every 1 second
|
| 158 |
-
|
|
|
|
| 159 |
|
| 160 |
# JavaScript logic binding for the Theme Toggle Switch
|
| 161 |
theme_toggle.click(
|
|
@@ -225,4 +226,4 @@ with gr.Blocks(css=CUSTOM_CSS, theme=gr.themes.Soft()) as demo:
|
|
| 225 |
clear_btn.click(fn=lambda: [], outputs=chatbot)
|
| 226 |
|
| 227 |
if __name__ == "__main__":
|
| 228 |
-
demo.launch()
|
|
|
|
| 143 |
yield "", updated_history
|
| 144 |
|
| 145 |
# Initialize customizable custom-themed layout frame
|
| 146 |
+
with gr.Blocks as demo:
|
| 147 |
|
| 148 |
# Top Control and Info Strip
|
| 149 |
with gr.Row():
|
|
|
|
| 155 |
theme_toggle = gr.Button("🌙 Dark Mode", elem_classes=["toggle-btn"])
|
| 156 |
|
| 157 |
# Automatically refresh time indicator string every 1 second
|
| 158 |
+
timer = gr.Timer(1.0)
|
| 159 |
+
timer.tick(fn=update_timestamp, outputs=timestamp_box)
|
| 160 |
|
| 161 |
# JavaScript logic binding for the Theme Toggle Switch
|
| 162 |
theme_toggle.click(
|
|
|
|
| 226 |
clear_btn.click(fn=lambda: [], outputs=chatbot)
|
| 227 |
|
| 228 |
if __name__ == "__main__":
|
| 229 |
+
demo.launch(css=CUSTOM_CSS, theme=gr.themes.Soft())
|