deepkansara-123 commited on
Commit
7efc910
·
verified ·
1 Parent(s): 8ca7a2a

Upload 6 files

Browse files
Files changed (1) hide show
  1. app.py +5 -6
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.Blocks(title="PDF Q&A Generator") as demo:
180
- with gr.Tab("🧠 2. Generate Questions & Answers"):
181
- gr.Markdown("### 🤖 Generate Questions and Answers from Uploaded PDF")
182
- fname = gr.Textbox(label="📄 Enter Uploaded Filename", placeholder="example.pdf")
183
- output_box = gr.Textbox(label="📝 Generated Q&A", lines=15, interactive=False)
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")