Spaces:
Runtime error
Runtime error
Sean MacAvaney
commited on
Commit
•
0f58367
1
Parent(s):
95a450b
update app.py
Browse files
app.py
CHANGED
@@ -3,17 +3,22 @@ from pyterrier_doc2query import Doc2Query
|
|
3 |
|
4 |
doc2query = Doc2Query()
|
5 |
|
6 |
-
def predict(
|
7 |
-
return
|
8 |
|
9 |
gr.Interface(
|
10 |
predict,
|
11 |
inputs=gr.Dataframe(
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
outputs=
|
|
|
|
|
|
|
|
|
|
|
18 |
title="pyterrier_doc2query",
|
19 |
).launch()
|
|
|
3 |
|
4 |
doc2query = Doc2Query()
|
5 |
|
6 |
+
def predict(input):
|
7 |
+
return doc2query(input)
|
8 |
|
9 |
gr.Interface(
|
10 |
predict,
|
11 |
inputs=gr.Dataframe(
|
12 |
+
headers=["docno", "text"],
|
13 |
+
datatype=["str", "str"],
|
14 |
+
col_count=(2, "fixed"),
|
15 |
+
value=[['0', '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.']],
|
16 |
+
),
|
17 |
+
outputs=gr.Dataframe(
|
18 |
+
headers=["docno", "text", "querygen"],
|
19 |
+
datatype=["str", "str", "str"],
|
20 |
+
row_count=0,
|
21 |
+
col_count=0,
|
22 |
+
),
|
23 |
title="pyterrier_doc2query",
|
24 |
).launch()
|