Spaces:
Sleeping
Sleeping
Upload 6 files
Browse files
app.py
CHANGED
|
@@ -176,12 +176,11 @@ with gr.Blocks(theme="default") as demo:
|
|
| 176 |
upload_out = gr.Textbox(label="Upload Result", interactive=False)
|
| 177 |
file.change(fn=upload_pdf, inputs=file, outputs=upload_out)
|
| 178 |
|
| 179 |
-
with gr.
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
gr.Button("🚀 Generate Q&A").click(fn=generate_qa, inputs=fname, outputs=output_box)
|
| 185 |
|
| 186 |
with gr.Tab("❓ 3. Ask a Question"):
|
| 187 |
gr.Markdown("### 💬 Ask a question based on uploaded PDF")
|
|
|
|
| 176 |
upload_out = gr.Textbox(label="Upload Result", interactive=False)
|
| 177 |
file.change(fn=upload_pdf, inputs=file, outputs=upload_out)
|
| 178 |
|
| 179 |
+
with gr.Tab("🧠 2. Generate Questions & Answers"):
|
| 180 |
+
gr.Markdown("### 🤖 Generate Questions and Answers from Uploaded PDF")
|
| 181 |
+
token_input = gr.Textbox(label="🔑 Enter Received Token", placeholder="e.g., 123e4567-e89b-12d3-a456...")
|
| 182 |
+
output_box = gr.Textbox(label="📝 Generated Q&A", lines=15, interactive=False)
|
| 183 |
+
gr.Button("🚀 Generate Q&A").click(fn=generate_qa, inputs=token_input, outputs=output_box)
|
|
|
|
| 184 |
|
| 185 |
with gr.Tab("❓ 3. Ask a Question"):
|
| 186 |
gr.Markdown("### 💬 Ask a question based on uploaded PDF")
|