Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
+
)
|