Spaces:
Runtime error
Runtime error
remove "delete database"
Browse files- src/view/view.py +3 -3
src/view/view.py
CHANGED
@@ -85,7 +85,7 @@ def run(ctrl: Chatbot, config: {}):
|
|
85 |
input_example_comp: gr.update(visible=True),
|
86 |
clear_btn: gr.update(visible=True),
|
87 |
include_images_btn: gr.update(visible=False,value=include_images_),
|
88 |
-
delete_database_btn: gr.update(visible=
|
89 |
upload_another_doc_btn: gr.update(visible=True),
|
90 |
collections_list: gr.update(choices=[a.name for a in ctrl.client_db.list_collections()],value=ctrl.retriever.collection.name),
|
91 |
page_start_warning: gr.update(visible=False),
|
@@ -116,7 +116,7 @@ def run(ctrl: Chatbot, config: {}):
|
|
116 |
input_example_comp: gr.update(value='', visible=False),
|
117 |
include_images_btn: gr.update(visible=True),
|
118 |
upload_another_doc_btn: gr.update(visible=False),
|
119 |
-
delete_database_btn: gr.update(visible=
|
120 |
page_start_warning: gr.update(visible=True),
|
121 |
actual_page_start: gr.update(visible=True, value=1),
|
122 |
collections_list: gr.update(value=None, choices=[a.name for a in ctrl.client_db.list_collections()]),
|
@@ -192,7 +192,7 @@ def run(ctrl: Chatbot, config: {}):
|
|
192 |
def change_collection(collection_name):
|
193 |
ctrl.retriever.collection = ctrl.client_db.get_collection(collection_name, embedding_function=open_ai_embedding)
|
194 |
return {
|
195 |
-
delete_database_btn: gr.update(visible=
|
196 |
input_doc_comp: gr.update(visible=False,value=None),
|
197 |
input_text_comp: gr.update(visible=True, value=''),
|
198 |
input_example_comp: gr.update(visible=True),
|
|
|
85 |
input_example_comp: gr.update(visible=True),
|
86 |
clear_btn: gr.update(visible=True),
|
87 |
include_images_btn: gr.update(visible=False,value=include_images_),
|
88 |
+
delete_database_btn: gr.update(visible=False),
|
89 |
upload_another_doc_btn: gr.update(visible=True),
|
90 |
collections_list: gr.update(choices=[a.name for a in ctrl.client_db.list_collections()],value=ctrl.retriever.collection.name),
|
91 |
page_start_warning: gr.update(visible=False),
|
|
|
116 |
input_example_comp: gr.update(value='', visible=False),
|
117 |
include_images_btn: gr.update(visible=True),
|
118 |
upload_another_doc_btn: gr.update(visible=False),
|
119 |
+
delete_database_btn: gr.update(visible=False),
|
120 |
page_start_warning: gr.update(visible=True),
|
121 |
actual_page_start: gr.update(visible=True, value=1),
|
122 |
collections_list: gr.update(value=None, choices=[a.name for a in ctrl.client_db.list_collections()]),
|
|
|
192 |
def change_collection(collection_name):
|
193 |
ctrl.retriever.collection = ctrl.client_db.get_collection(collection_name, embedding_function=open_ai_embedding)
|
194 |
return {
|
195 |
+
delete_database_btn: gr.update(visible=False),
|
196 |
input_doc_comp: gr.update(visible=False,value=None),
|
197 |
input_text_comp: gr.update(visible=True, value=''),
|
198 |
input_example_comp: gr.update(visible=True),
|