Update app.py
Browse files
app.py
CHANGED
|
@@ -129,12 +129,13 @@ with gr.Blocks(css=css,theme = gr.themes.Soft()) as demo:
|
|
| 129 |
prompt = gr.Textbox(label="Behaviour Prompt (optional)", placeholder="Reply to all questions as a rap / Reply to all questions in Hindi etc. ")
|
| 130 |
#repo_id = gr.Dropdown(label="LLM", choices=["google/flan-ul2", "OpenAssistant/oasst-sft-1-pythia-12b", "bigscience/bloomz"], value="google/flan-ul2")
|
| 131 |
with gr.Row():
|
| 132 |
-
langchain_status = gr.Textbox(label="Status", placeholder="", interactive=False)
|
| 133 |
load_pdf = gr.Button("Load pdf")
|
| 134 |
with gr.Column(scale=2):
|
| 135 |
-
chatbot = gr.Chatbot([], elem_id="chatbot").style(height=
|
| 136 |
-
|
| 137 |
-
|
|
|
|
| 138 |
#load_pdf.click(loading_pdf, None, langchain_status, queue=False)
|
| 139 |
#repo_id.change(pdf_changes, inputs=[pdf_doc], outputs=[langchain_status], queue=False)
|
| 140 |
load_pdf.click(pdf_changes, inputs=[pdf_doc,prompt], outputs=[langchain_status], queue=False)
|
|
|
|
| 129 |
prompt = gr.Textbox(label="Behaviour Prompt (optional)", placeholder="Reply to all questions as a rap / Reply to all questions in Hindi etc. ")
|
| 130 |
#repo_id = gr.Dropdown(label="LLM", choices=["google/flan-ul2", "OpenAssistant/oasst-sft-1-pythia-12b", "bigscience/bloomz"], value="google/flan-ul2")
|
| 131 |
with gr.Row():
|
| 132 |
+
langchain_status = gr.Textbox(label="Status", placeholder="Waiting for PDF", interactive=False,show_label=False)
|
| 133 |
load_pdf = gr.Button("Load pdf")
|
| 134 |
with gr.Column(scale=2):
|
| 135 |
+
chatbot = gr.Chatbot([], elem_id="chatbot",show_label=False).style(height=600)
|
| 136 |
+
with gr.Row():
|
| 137 |
+
question = gr.Textbox(label="Question", placeholder="Type your question and hit Enter ",scale=6,show_label=False)
|
| 138 |
+
submit_btn = gr.Button("Send",scale=1)
|
| 139 |
#load_pdf.click(loading_pdf, None, langchain_status, queue=False)
|
| 140 |
#repo_id.change(pdf_changes, inputs=[pdf_doc], outputs=[langchain_status], queue=False)
|
| 141 |
load_pdf.click(pdf_changes, inputs=[pdf_doc,prompt], outputs=[langchain_status], queue=False)
|