Sean MacAvaney commited on
Commit
68be317
1 Parent(s): 39e8c59
Files changed (2) hide show
  1. app.py +21 -0
  2. requirements.txt +4 -0
app.py ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import pyterrier as pt
3
+ pt.init()
4
+ from pyterrier_doc2query import Doc2Query
5
+
6
+ doc2query = Doc2Query()
7
+
8
+ def predict(input_df):
9
+ return input_df
10
+
11
+ gr.Interface(
12
+ predict,
13
+ inputs=gr.Dataframe(
14
+ headers=["docno", "text"],
15
+ datatype=["str", "str"],
16
+ row_count=5,
17
+ col_count=(2, "fixed"),
18
+ ),
19
+ outputs="dataframe",
20
+ title="pyterrier_doc2query",
21
+ ).launch()
requirements.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ python-terrier
2
+ ir_datasets
3
+ ir_measures
4
+ git+https://github.com/terrierteam/pyterrier_doc2query