Update app.py
Browse files
app.py
CHANGED
@@ -102,6 +102,8 @@ class ChatWrapper:
|
|
102 |
|
103 |
chat = ChatWrapper()
|
104 |
|
|
|
|
|
105 |
block = gr.Blocks(css=".gradio-container {background-color: lightgray}")
|
106 |
|
107 |
with block:
|
@@ -118,9 +120,12 @@ with block:
|
|
118 |
with gr.Row():
|
119 |
embeddings = gr.Radio(choices=model_options_list,value=model_options_list[0], label='Choose your Embedding Model',
|
120 |
interactive=True)
|
121 |
-
|
122 |
|
123 |
-
|
|
|
|
|
|
|
|
|
124 |
|
125 |
chatbot = gr.Chatbot()
|
126 |
|
|
|
102 |
|
103 |
chat = ChatWrapper()
|
104 |
|
105 |
+
store_state = gr.State(value=model_options_list[0])
|
106 |
+
|
107 |
block = gr.Blocks(css=".gradio-container {background-color: lightgray}")
|
108 |
|
109 |
with block:
|
|
|
120 |
with gr.Row():
|
121 |
embeddings = gr.Radio(choices=model_options_list,value=model_options_list[0], label='Choose your Embedding Model',
|
122 |
interactive=True)
|
|
|
123 |
|
124 |
+
embeddings.change(load_vectorstore,embeddings,store_state)
|
125 |
+
|
126 |
+
print(store_state)
|
127 |
+
|
128 |
+
vectorstore = load_vectorstore(store_state)
|
129 |
|
130 |
chatbot = gr.Chatbot()
|
131 |
|