cicboy commited on
Commit
9aca198
Β·
1 Parent(s): 6ee1bbb

Restore Upload PDF tab

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -141,6 +141,12 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
141
 
142
  gr.Markdown("## πŸ“„ PDF Q&A Bot with Weaviate + OpenAI")
143
 
 
 
 
 
 
 
144
  with gr.Tab("Ask Questions"):
145
  question = gr.Textbox(
146
  label="Your Question",
 
141
 
142
  gr.Markdown("## πŸ“„ PDF Q&A Bot with Weaviate + OpenAI")
143
 
144
+ with gr.Tab("Upload PDF"):
145
+ pdf_input = gr.File(label="Upload PDF", type="filepath")
146
+ upload_btn = gr.Button("Process PDF")
147
+ status = gr.Textbox(label="Status")
148
+ upload_btn.click(process_pdf, inputs=pdf_input, outputs=status)
149
+
150
  with gr.Tab("Ask Questions"):
151
  question = gr.Textbox(
152
  label="Your Question",