KhaledAB2023 commited on
Commit
10a4748
·
verified ·
1 Parent(s): b686f19

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -66,11 +66,12 @@ def process_pdf_and_ask_question(pdf_file,question):
66
  return res["answer"]
67
 
68
  def gradio_interface(pdf,question):
69
-
70
 
71
- gr.interface(fn=process_pdf_and_ask_question,
72
  inputs=[gr.File(file_count="single", type="filepath"), gr.Textbox(lines=2, placeholder="Ask a question...")],
73
  outputs="text",
74
  title="PDF Q&A",
75
  description="Upload a PDF and ask questions about it.",
76
- )launch()
 
 
66
  return res["answer"]
67
 
68
  def gradio_interface(pdf,question):
69
+ return process_pdf_and_ask_question(pdf,question)
70
 
71
+ app=gr.interface(fn=gradio_interface,
72
  inputs=[gr.File(file_count="single", type="filepath"), gr.Textbox(lines=2, placeholder="Ask a question...")],
73
  outputs="text",
74
  title="PDF Q&A",
75
  description="Upload a PDF and ask questions about it.",
76
+ )
77
+ app.launch()