Spaces:
Runtime error
Runtime error
Sean MacAvaney
commited on
Commit
•
d40a755
1
Parent(s):
c2a3101
update
Browse files- app.py +2 -8
- requirements.txt +1 -1
app.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
import pandas as pd
|
2 |
import gradio as gr
|
3 |
from pyterrier_doc2query import Doc2Query
|
4 |
-
from pyterrier_gradio import Demo, MarkdownFile, interface, df2code, code2md
|
5 |
|
6 |
MODEL = 'macavaney/doc2query-t5-base-msmarco'
|
7 |
|
@@ -26,17 +26,11 @@ doc2query({df2code(input)})
|
|
26 |
'''
|
27 |
return (doc2query(input), code2md(code, COLAB_INSTALL, COLAB_NAME))
|
28 |
|
29 |
-
example_inp = pd.DataFrame([
|
30 |
-
{'docno': '0', 'text': 'The presence of communication amid scientific minds was equally important to the success of the Manhattan Project as scientific intellect was. The only cloud hanging over the impressive achievement of the atomic researchers and engineers is what their success truly meant; hundreds of thousands of innocent lives obliterated.'},
|
31 |
-
{'docno': '86', 'text': 'Usually, you can feel the pain reverberating from the upper portion of the left side of your abdomen towards the left side of your ribcage. Irritation on the Spleen – There is a chance that your spleen has already ruptured because of various reasons and this can cause some pains on the left rib cage.'},
|
32 |
-
{'docno': '985', 'text': 'Continue on Hollins Ferry Road to Patapsco Avenue. Make a right onto Patapsco Avenue for approximately 2.5 miles. The courthouse is at the corner of Patapsco Avenue and 7th Street. The commissioner\'s office is on the first (ground) floor.'}
|
33 |
-
])
|
34 |
-
|
35 |
interface(
|
36 |
MarkdownFile('README.md'),
|
37 |
Demo(
|
38 |
predict,
|
39 |
-
|
40 |
[
|
41 |
gr.Dropdown(
|
42 |
choices=[MODEL],
|
|
|
1 |
import pandas as pd
|
2 |
import gradio as gr
|
3 |
from pyterrier_doc2query import Doc2Query
|
4 |
+
from pyterrier_gradio import Demo, MarkdownFile, interface, df2code, code2md, EX_D
|
5 |
|
6 |
MODEL = 'macavaney/doc2query-t5-base-msmarco'
|
7 |
|
|
|
26 |
'''
|
27 |
return (doc2query(input), code2md(code, COLAB_INSTALL, COLAB_NAME))
|
28 |
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
interface(
|
30 |
MarkdownFile('README.md'),
|
31 |
Demo(
|
32 |
predict,
|
33 |
+
EX_D,
|
34 |
[
|
35 |
gr.Dropdown(
|
36 |
choices=[MODEL],
|
requirements.txt
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
git+https://github.com/seanmacavaney/pyterrier_gradio@v0.0.
|
2 |
git+https://github.com/terrier-org/pyterrier
|
3 |
git+https://github.com/terrierteam/pyterrier_doc2query@master
|
4 |
ir_datasets
|
|
|
1 |
+
git+https://github.com/seanmacavaney/pyterrier_gradio@v0.0.4
|
2 |
git+https://github.com/terrier-org/pyterrier
|
3 |
git+https://github.com/terrierteam/pyterrier_doc2query@master
|
4 |
ir_datasets
|