NAB1108 commited on
Commit
89dfad4
·
1 Parent(s): 2f13a77

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -12
app.py CHANGED
@@ -123,18 +123,18 @@ title = """
123
  with gr.Blocks(css=css,theme = gr.themes.Soft()) as demo:
124
  with gr.Column(elem_id="col-container"):
125
  #gr.HTML(title)
126
-
127
- with gr.Column():
128
- pdf_doc = gr.File(label="Load a pdf", file_types=['.pdf'], type="file")
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
-
135
- chatbot = gr.Chatbot([], elem_id="chatbot").style(height=350)
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)
 
123
  with gr.Blocks(css=css,theme = gr.themes.Soft()) as demo:
124
  with gr.Column(elem_id="col-container"):
125
  #gr.HTML(title)
126
+ with gr.Row():
127
+ with gr.Column(scale=1):
128
+ pdf_doc = gr.File(label="Load a pdf", file_types=['.pdf'], type="file")
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=800)
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)