Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -102,7 +102,7 @@ with gr.Blocks(css=css) as demo:
|
|
102 |
|
103 |
with gr.Column(elem_id="col-container"):
|
104 |
pdf_doc = gr.File(label="Load a pdf", file_types=['.pdf'], type="file")
|
105 |
-
repo_id = gr.Dropdown(label="LLM", choices=["google/flan-ul2", "OpenAssistant/oasst-sft-1-pythia-12b", "bigscience/bloomz", "meta-llama/Llama-2-7b-chat-hf"], value="google/flan-ul2")
|
106 |
with gr.Row():
|
107 |
langchain_status = gr.Textbox(label="Status", placeholder="", interactive=False)
|
108 |
load_pdf = gr.Button("Load pdf to langchain")
|
@@ -110,7 +110,7 @@ with gr.Blocks(css=css) as demo:
|
|
110 |
chatbot = gr.Chatbot([], elem_id="chatbot").style(height=350)
|
111 |
question = gr.Textbox(label="Question", placeholder="Type your Question and hit Enter ",elem_id="chatbot .user-message")
|
112 |
submit_btn = gr.Button("Send message")
|
113 |
-
|
114 |
repo_id.change(pdf_changes, inputs=[pdf_doc, repo_id], outputs=[langchain_status], queue=False)
|
115 |
load_pdf.click(pdf_changes, inputs=[pdf_doc, repo_id], outputs=[langchain_status], queue=False)
|
116 |
question.submit(add_text, [chatbot, question], [chatbot, question]).then(
|
|
|
102 |
|
103 |
with gr.Column(elem_id="col-container"):
|
104 |
pdf_doc = gr.File(label="Load a pdf", file_types=['.pdf'], type="file")
|
105 |
+
repo_id = gr.Dropdown(label="LLM", choices=["mistralai/Mixtral-8x7B-v0.1","google/flan-ul2", "OpenAssistant/oasst-sft-1-pythia-12b", "bigscience/bloomz", "meta-llama/Llama-2-7b-chat-hf"], value="google/flan-ul2")
|
106 |
with gr.Row():
|
107 |
langchain_status = gr.Textbox(label="Status", placeholder="", interactive=False)
|
108 |
load_pdf = gr.Button("Load pdf to langchain")
|
|
|
110 |
chatbot = gr.Chatbot([], elem_id="chatbot").style(height=350)
|
111 |
question = gr.Textbox(label="Question", placeholder="Type your Question and hit Enter ",elem_id="chatbot .user-message")
|
112 |
submit_btn = gr.Button("Send message")
|
113 |
+
load_pdf.click(loading_pdf, None, langchain_status, queue=False)
|
114 |
repo_id.change(pdf_changes, inputs=[pdf_doc, repo_id], outputs=[langchain_status], queue=False)
|
115 |
load_pdf.click(pdf_changes, inputs=[pdf_doc, repo_id], outputs=[langchain_status], queue=False)
|
116 |
question.submit(add_text, [chatbot, question], [chatbot, question]).then(
|