KalooAI commited on
Commit
6cfe0b8
·
verified ·
1 Parent(s): 48b5a8d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -12
app.py CHANGED
@@ -165,18 +165,18 @@ with gr.Blocks(title="Granite PDF QA") as demo:
165
 
166
  state = gr.State({"chunks": None, "index": None})
167
 
168
- with gr.Row():
169
- with gr.Column(scale=1):
170
- pdf_input = gr.File(label="Upload PDF", file_types=[".pdf"])
171
- pdf_status = gr.Textbox(label="Status", interactive=False)
172
-
173
- with gr.Column(scale=2):
174
- question = gr.Textbox(label="Your question", lines=2)
175
- answer = gr.Textbox(label="Answer", lines=8)
176
- ask_button = gr.Button("Ask")
177
-
178
- pdf_input.upload(load_pdf, inputs=[pdf_input, state], outputs=[pdf_status, state])
179
- ask_button.click(answer_question, inputs=[question, state], outputs=answer)
180
 
181
  if __name__ == "__main__":
182
  demo.launch()
 
165
 
166
  state = gr.State({"chunks": None, "index": None})
167
 
168
+ with gr.Row():
169
+ with gr.Column(scale=1):
170
+ pdf_input = gr.File(label="Upload PDF", file_types=[".pdf"])
171
+ pdf_status = gr.Textbox(label="Status", interactive=False)
172
+
173
+ with gr.Column(scale=2):
174
+ question = gr.Textbox(label="Your question", lines=2)
175
+ answer = gr.Textbox(label="Answer", lines=8)
176
+ ask_button = gr.Button("Ask")
177
+
178
+ pdf_input.upload(load_pdf, inputs=[pdf_input, state], outputs=[pdf_status, state])
179
+ ask_button.click(answer_question, inputs=[question, state], outputs=answer)
180
 
181
  if __name__ == "__main__":
182
  demo.launch()