Maamoungz commited on
Commit
06cb597
·
verified ·
1 Parent(s): a1b2661

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -63,4 +63,11 @@ def process_pdf_and_ask_question(pdf_file,question)
63
 
64
  # Process the question
65
  res = chain({"question": question})
66
- return res["answer"]
 
 
 
 
 
 
 
 
63
 
64
  # Process the question
65
  res = chain({"question": question})
66
+ return res["answer"]
67
+
68
+ gr.Interface(fn=process_pdf_and_ask_question,
69
+ inputs=[gr.File(file_count="single", type="filepath"), gr.Textbox(lines=2, placeholder="Ask a question...")],
70
+ outputs="text",
71
+ title="PDF Q&A",
72
+ description="Upload a PDF and ask questions about it."
73
+ )