Pine
Browse files
app.py
CHANGED
@@ -84,6 +84,7 @@ def doc_emb(doc: str):
|
|
84 |
# for f in futures:
|
85 |
# emb_list.append(f.result())
|
86 |
print('\n'.join(texts))
|
|
|
87 |
gr.Textbox.update(value="")
|
88 |
return texts, emb_list, gr.Textbox.update(visible=True), gr.Button.update(visible=True), gr.Markdown.update(
|
89 |
value="""success ! Let's talk"""), gr.Chatbot.update(visible=True)
|
@@ -271,7 +272,7 @@ with gr.Blocks() as demo:
|
|
271 |
chat_bu = gr.Button(value='Clear', visible=False)
|
272 |
|
273 |
file.change(up_file, [file], [txt, doc_bu, md]) #hiding the text
|
274 |
-
doc_bu.click(
|
275 |
msg_txt.submit(get_response, [msg_txt, chat_bot,doc_text_state, doc_emb_state], [chat_bot],queue=False)
|
276 |
chat_bu.click(lambda: None, None, chat_bot, queue=False)
|
277 |
|
|
|
84 |
# for f in futures:
|
85 |
# emb_list.append(f.result())
|
86 |
print('\n'.join(texts))
|
87 |
+
pine(doc)
|
88 |
gr.Textbox.update(value="")
|
89 |
return texts, emb_list, gr.Textbox.update(visible=True), gr.Button.update(visible=True), gr.Markdown.update(
|
90 |
value="""success ! Let's talk"""), gr.Chatbot.update(visible=True)
|
|
|
272 |
chat_bu = gr.Button(value='Clear', visible=False)
|
273 |
|
274 |
file.change(up_file, [file], [txt, doc_bu, md]) #hiding the text
|
275 |
+
doc_bu.click(doc_emb, [txt], [doc_text_state, doc_emb_state, msg_txt, chat_bu, md, chat_bot])
|
276 |
msg_txt.submit(get_response, [msg_txt, chat_bot,doc_text_state, doc_emb_state], [chat_bot],queue=False)
|
277 |
chat_bu.click(lambda: None, None, chat_bot, queue=False)
|
278 |
|