Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -690,9 +690,8 @@ demo = gr.ChatInterface(
|
|
690 |
)
|
691 |
)
|
692 |
|
693 |
-
|
694 |
-
|
695 |
-
pass
|
696 |
|
697 |
# Add file upload functionality
|
698 |
# Add file upload functionality
|
@@ -706,25 +705,6 @@ with demo:
|
|
706 |
|
707 |
update_output = gr.Textbox(label="Update Status")
|
708 |
delete_button = gr.Button("Delete Selected Documents")
|
709 |
-
|
710 |
-
with gr.Column(scale=3):
|
711 |
-
with gr.Box():
|
712 |
-
dropdown = gr.Dropdown(choices=["Option 1", "Option 2", "Option 3"], label="Select an Option")
|
713 |
-
toggle_dark = gr.Button(value="Toggle Dark").style(full_width=True)
|
714 |
-
|
715 |
-
# Handle dropdown changes
|
716 |
-
dropdown.change(on_dropdown_change, dropdown, None, _js="() => {}")
|
717 |
-
|
718 |
-
# Handle the Toggle Dark button click
|
719 |
-
toggle_dark.click(
|
720 |
-
None,
|
721 |
-
_js="""
|
722 |
-
() => {
|
723 |
-
document.body.classList.toggle('dark');
|
724 |
-
document.querySelector('gradio-app').style.backgroundColor = 'var(--color-background-primary)';
|
725 |
-
}
|
726 |
-
""",
|
727 |
-
)
|
728 |
|
729 |
# Update both the output text and the document selector
|
730 |
update_button.click(
|
|
|
690 |
)
|
691 |
)
|
692 |
|
693 |
+
# Initialize dark mode state
|
694 |
+
dark_mode = gr.State(False)
|
|
|
695 |
|
696 |
# Add file upload functionality
|
697 |
# Add file upload functionality
|
|
|
705 |
|
706 |
update_output = gr.Textbox(label="Update Status")
|
707 |
delete_button = gr.Button("Delete Selected Documents")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
708 |
|
709 |
# Update both the output text and the document selector
|
710 |
update_button.click(
|