stefanbschneider commited on
Commit
eff9d98
·
verified ·
1 Parent(s): f5a2f7d

Add default file and question

Browse files
Files changed (1) hide show
  1. app.py +10 -2
app.py CHANGED
@@ -26,6 +26,14 @@ def answer_doc_question(pdf_file, question):
26
  return answer["answer"]
27
 
28
 
29
- pdf_input = gr.File(file_types=[".pdf"], label="Upload a PDF document and ask a question about it.")
30
- question = gr.Textbox(label="Type a question regarding the uploaded document here.")
 
 
 
 
 
 
 
 
31
  gr.Interface(fn=answer_doc_question, inputs=[pdf_input, question], outputs="text").launch()
 
26
  return answer["answer"]
27
 
28
 
29
+ # Add default a file and question, so it's easy to try out the app.
30
+ pdf_input = gr.File(
31
+ value="https://ris.uni-paderborn.de/download/30236/30237/author_version.pdf",
32
+ file_types=[".pdf"],
33
+ label="Upload a PDF document and ask a question about it.",
34
+ )
35
+ question = gr.Textbox(
36
+ value="What is mobile-env?",
37
+ label="Type a question regarding the uploaded document here.",
38
+ )
39
  gr.Interface(fn=answer_doc_question, inputs=[pdf_input, question], outputs="text").launch()