Spaces:
Sleeping
Sleeping
Restore Upload PDF tab
Browse files
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",
|