Update app.py
Browse files
app.py
CHANGED
@@ -33,8 +33,8 @@ def process_selected_files(selected_files, file_list):
|
|
33 |
# εθ³ζ樑ζ¬θη RAG
|
34 |
return f"ε·²θηηζδ»Ά: {', '.join(selected_paths)}"
|
35 |
|
36 |
-
def
|
37 |
-
return gr.update(
|
38 |
|
39 |
with gr.Blocks() as demo:
|
40 |
gr.Markdown("# AI Notes Assistant")
|
@@ -75,9 +75,9 @@ with gr.Blocks() as demo:
|
|
75 |
with gr.Tab("ε
Άδ»εθ½"):
|
76 |
gr.Markdown("ζ€θε―δ»₯ζ·»ε ζ΄ε€εθ½ε‘η")
|
77 |
|
78 |
-
source_toggle.change(
|
79 |
-
chat_toggle.change(
|
80 |
-
feature_toggle.change(
|
81 |
|
82 |
history = gr.State([])
|
83 |
ask_button.click(mock_question_answer, inputs=[question, history], outputs=[chatbot, chatbot])
|
|
|
33 |
# εθ³ζ樑ζ¬θη RAG
|
34 |
return f"ε·²θηηζδ»Ά: {', '.join(selected_paths)}"
|
35 |
|
36 |
+
def toggle_visibility(toggle_value, column):
|
37 |
+
return gr.update(visible=toggle_value)
|
38 |
|
39 |
with gr.Blocks() as demo:
|
40 |
gr.Markdown("# AI Notes Assistant")
|
|
|
75 |
with gr.Tab("ε
Άδ»εθ½"):
|
76 |
gr.Markdown("ζ€θε―δ»₯ζ·»ε ζ΄ε€εθ½ε‘η")
|
77 |
|
78 |
+
source_toggle.change(toggle_visibility, inputs=[source_toggle, source_column], outputs=source_column)
|
79 |
+
chat_toggle.change(toggle_visibility, inputs=[chat_toggle, chat_column], outputs=chat_column)
|
80 |
+
feature_toggle.change(toggle_visibility, inputs=[feature_toggle, feature_column], outputs=feature_column)
|
81 |
|
82 |
history = gr.State([])
|
83 |
ask_button.click(mock_question_answer, inputs=[question, history], outputs=[chatbot, chatbot])
|