Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -31,9 +31,9 @@ async def initialize(file_path, question):
|
|
31 |
return "Error: Unable to process the document. Please ensure the PDF file is valid."
|
32 |
|
33 |
# Define Gradio Interface
|
34 |
-
input_file = gr.
|
35 |
-
input_question = gr.
|
36 |
-
output_text = gr.
|
37 |
|
38 |
async def pdf_qa(file, question):
|
39 |
answer = await initialize(file.name, question)
|
|
|
31 |
return "Error: Unable to process the document. Please ensure the PDF file is valid."
|
32 |
|
33 |
# Define Gradio Interface
|
34 |
+
input_file = gr.File(label="Upload PDF File")
|
35 |
+
input_question = gr.Textbox(label="Ask about the document")
|
36 |
+
output_text = gr.Textbox(label="Answer - GeminiPro")
|
37 |
|
38 |
async def pdf_qa(file, question):
|
39 |
answer = await initialize(file.name, question)
|