Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -64,5 +64,15 @@ def process_pdf_and_ask_question(pdf_file,question):
|
|
64 |
# Process the question
|
65 |
res = chain({"question": question})
|
66 |
return res["answer"]
|
67 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
|
|
|
64 |
# Process the question
|
65 |
res = chain({"question": question})
|
66 |
return res["answer"]
|
67 |
+
|
68 |
+
|
69 |
+
app=gr.interface(fn=process_pdf_and_ask_question,
|
70 |
+
inputs=[gr.File(file_count="single", type="filepath"), gr.Textbox(lines=2, placeholder="Ask a question...")],
|
71 |
+
outputs="text",
|
72 |
+
title="PDF Q&A",
|
73 |
+
description="Upload a PDF and ask questions about it.",
|
74 |
+
|
75 |
+
)
|
76 |
+
|
77 |
+
app.launch()
|
78 |
|