Epoching commited on
Commit
f924d76
1 Parent(s): b2f617b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -14
app.py CHANGED
@@ -83,7 +83,17 @@ with demo:
83
  - <u>**CrossEncoder Context Retrieval**</u>: All Contexts + Question -> Top K Relevant Contexts best suited for answering question
84
  - <u>**UnifiedQA**</u>: Most Relevant Contexts + Supplied Question -> Predict Set of Probable Answers
85
  ''')
86
-
 
 
 
 
 
 
 
 
 
 
87
  with gr.Column():
88
  with gr.Row():
89
  output_gallery = gr.Gallery(label='DiT Predicted Entities')
@@ -105,17 +115,4 @@ with demo:
105
 
106
  button_run.click(fn=run_fn, inputs=[input_pdf_file, input_question_text, input_k_percent], outputs=[output_gallery, output_contexts, output_ranked_contexts, output_qa_results])
107
 
108
- examples = [
109
- ['examples/1909.00694.pdf', 'What is the seed lexicon?', 5],
110
- ['examples/1909.00694.pdf', 'How big is seed lexicon used for training?', 5],
111
- ['examples/1810.04805.pdf', 'What is this paper about?', 5],
112
- ['examples/1810.04805.pdf', 'What is the model size?', 5],
113
- ['examples/2105.03011.pdf', 'How many questions are in this dataset?', 5],
114
- ['examples/1909.00694.pdf', 'How are relations used to propagate polarity?', 5],
115
-
116
- ]
117
- gr.Examples(examples=examples,
118
- inputs=[input_pdf_file, input_question_text, input_k_percent])
119
-
120
- # examples = gr.Dataset(components=[input_pdf_file, input_question_text], samples=[[open('examples/1810.04805.pdf', mode='rb'), 'How many parameters are in the model?']])
121
  demo.launch(enable_queue=True)
 
83
  - <u>**CrossEncoder Context Retrieval**</u>: All Contexts + Question -> Top K Relevant Contexts best suited for answering question
84
  - <u>**UnifiedQA**</u>: Most Relevant Contexts + Supplied Question -> Predict Set of Probable Answers
85
  ''')
86
+ examples = [
87
+ ['examples/1909.00694.pdf', 'What is the seed lexicon?', 5],
88
+ ['examples/1909.00694.pdf', 'How big is seed lexicon used for training?', 5],
89
+ ['examples/1810.04805.pdf', 'What is this paper about?', 5],
90
+ ['examples/1810.04805.pdf', 'What is the model size?', 5],
91
+ ['examples/2105.03011.pdf', 'How many questions are in this dataset?', 5],
92
+ ['examples/1909.00694.pdf', 'How are relations used to propagate polarity?', 5],
93
+ ]
94
+ gr.Examples(examples=examples,
95
+ inputs=[input_pdf_file, input_question_text, input_k_percent])
96
+
97
  with gr.Column():
98
  with gr.Row():
99
  output_gallery = gr.Gallery(label='DiT Predicted Entities')
 
115
 
116
  button_run.click(fn=run_fn, inputs=[input_pdf_file, input_question_text, input_k_percent], outputs=[output_gallery, output_contexts, output_ranked_contexts, output_qa_results])
117
 
 
 
 
 
 
 
 
 
 
 
 
 
 
118
  demo.launch(enable_queue=True)