Spaces:
Running
Running
Commit
·
de8093f
1
Parent(s):
46a768d
adding chatbot
Browse files
app.py
CHANGED
@@ -72,7 +72,7 @@ def document_loader(file_path,api_key,doc_type='pdf',llm='Huggingface'):
|
|
72 |
else:
|
73 |
return "Error in loading Documents "
|
74 |
|
75 |
-
return "Document
|
76 |
|
77 |
|
78 |
def process_text_document(document_file):
|
@@ -170,7 +170,7 @@ with gr.Blocks(css=css) as demo:
|
|
170 |
with gr.Row():
|
171 |
question = gr.Textbox(label="Type your question?",lines=1).style(full_width=False)
|
172 |
submit_btn = gr.Button(value="Send message", variant="secondary", scale = 1)
|
173 |
-
|
174 |
-
|
175 |
|
176 |
demo.launch()
|
|
|
72 |
else:
|
73 |
return "Error in loading Documents "
|
74 |
|
75 |
+
return "Document Processing completed ..."
|
76 |
|
77 |
|
78 |
def process_text_document(document_file):
|
|
|
170 |
with gr.Row():
|
171 |
question = gr.Textbox(label="Type your question?",lines=1).style(full_width=False)
|
172 |
submit_btn = gr.Button(value="Send message", variant="secondary", scale = 1)
|
173 |
+
question.submit(add_text, [chatbot, question], [chatbot, question]).then(bot, chatbot, chatbot)
|
174 |
+
submit_btn.click(add_text, [chatbot, question], [chatbot, question]).then(bot, chatbot, chatbot)
|
175 |
|
176 |
demo.launch()
|