NAB1108 commited on
Commit
55ca354
·
1 Parent(s): aa09979

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
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=500)
136
- question = gr.Textbox(label="Question", placeholder="Type your question and hit Enter ")
137
- submit_btn = gr.Button("Send message")
 
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)