Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -76,12 +76,11 @@ with gr.Blocks(css=css) as demo:
|
|
| 76 |
with gr.Column():
|
| 77 |
pdf_doc = gr.File(label="Load a PDF", file_types=['.pdf'], type="file")
|
| 78 |
load_pdf = gr.Button("Load PDF")
|
| 79 |
-
Books = gr.Dropdown(label="Books", choices=[("
|
| 80 |
langchain_status = gr.Textbox(label="Status", placeholder="", interactive=False)
|
| 81 |
chatbot = gr.Chatbot([], elem_id="chatbot").style(height=350)
|
| 82 |
question = gr.Textbox(label="Question", placeholder="Type your question and hit Enter ")
|
| 83 |
-
submit_btn = gr.Button("Send message")
|
| 84 |
-
#load_pdf.click(loading_pdf, None, langchain_status, queue=False)
|
| 85 |
Books.change(book_changes, inputs=[Books], outputs=[langchain_status], queue=False)
|
| 86 |
load_pdf.click(pdf_changes, inputs=[pdf_doc], outputs=[langchain_status], queue=False)
|
| 87 |
question.submit(add_text, [chatbot, question], [chatbot, question]).then(
|
|
|
|
| 76 |
with gr.Column():
|
| 77 |
pdf_doc = gr.File(label="Load a PDF", file_types=['.pdf'], type="file")
|
| 78 |
load_pdf = gr.Button("Load PDF")
|
| 79 |
+
Books = gr.Dropdown(label="Books", choices=[("Harry Potter and the Philosopher's Stone","Book1") , ("Harry Potter and the Chamber of Secrets","Book2") , ("Harry Potter and the Order of the Phoenix","Book3")] )
|
| 80 |
langchain_status = gr.Textbox(label="Status", placeholder="", interactive=False)
|
| 81 |
chatbot = gr.Chatbot([], elem_id="chatbot").style(height=350)
|
| 82 |
question = gr.Textbox(label="Question", placeholder="Type your question and hit Enter ")
|
| 83 |
+
submit_btn = gr.Button("Send message")
|
|
|
|
| 84 |
Books.change(book_changes, inputs=[Books], outputs=[langchain_status], queue=False)
|
| 85 |
load_pdf.click(pdf_changes, inputs=[pdf_doc], outputs=[langchain_status], queue=False)
|
| 86 |
question.submit(add_text, [chatbot, question], [chatbot, question]).then(
|