Spaces:
Runtime error
Runtime error
samarthagarwal23
commited on
Commit
·
2482299
1
Parent(s):
1f6cc95
Update app.py
Browse files
app.py
CHANGED
@@ -82,6 +82,12 @@ def final_qa_pipeline(file, query):
|
|
82 |
else:
|
83 |
return ("No match", 0)
|
84 |
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
iface = gr.Interface(
|
86 |
fn = final_qa_pipeline,
|
87 |
inputs = [gr.inputs.File(label="input pdf file"), gr.inputs.Textbox(label="Question:")],
|
|
|
82 |
else:
|
83 |
return ("No match", 0)
|
84 |
|
85 |
+
examples = [
|
86 |
+
[os.path.abspath("NASDAQ_AAPL_2020.pdf"), "how much are the outstanding shares?"],
|
87 |
+
[os.path.abspath("NASDAQ_MSFT_2020.pdf"), "how much was the profit?"],
|
88 |
+
[os.path.abspath("dbs-annual-report-2020.pdf"), "What is the shareholder equity?"],
|
89 |
+
]
|
90 |
+
|
91 |
iface = gr.Interface(
|
92 |
fn = final_qa_pipeline,
|
93 |
inputs = [gr.inputs.File(label="input pdf file"), gr.inputs.Textbox(label="Question:")],
|