Spaces:
Sleeping
Sleeping
Sean MacAvaney
commited on
Commit
•
3496484
1
Parent(s):
8f05d21
update
Browse files- app.py +3 -7
- requirements.txt +1 -1
app.py
CHANGED
@@ -6,7 +6,7 @@ import gradio as gr
|
|
6 |
import pyterrier as pt
|
7 |
pt.init()
|
8 |
import pyt_splade
|
9 |
-
from pyterrier_gradio import Demo, MarkdownFile, interface, df2code, code2md
|
10 |
factory_max = pyt_splade.SpladeFactory(agg='max')
|
11 |
factory_sum = pyt_splade.SpladeFactory(agg='sum')
|
12 |
|
@@ -97,9 +97,7 @@ interface(
|
|
97 |
MarkdownFile('query.md'),
|
98 |
Demo(
|
99 |
predict_query,
|
100 |
-
|
101 |
-
{'qid': '1112389', 'query': 'what is the county for grand rapids, mn'},
|
102 |
-
]),
|
103 |
[
|
104 |
gr.Dropdown(choices=['max', 'sum'], value='max', label='Aggregation'),
|
105 |
],
|
@@ -108,9 +106,7 @@ interface(
|
|
108 |
MarkdownFile('doc.md'),
|
109 |
Demo(
|
110 |
predict_doc,
|
111 |
-
|
112 |
-
{'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.'},
|
113 |
-
]),
|
114 |
[
|
115 |
gr.Dropdown(choices=['max', 'sum'], value='max', label='Aggregation'),
|
116 |
],
|
|
|
6 |
import pyterrier as pt
|
7 |
pt.init()
|
8 |
import pyt_splade
|
9 |
+
from pyterrier_gradio import Demo, MarkdownFile, interface, df2code, code2md, EX_Q, EX_D
|
10 |
factory_max = pyt_splade.SpladeFactory(agg='max')
|
11 |
factory_sum = pyt_splade.SpladeFactory(agg='sum')
|
12 |
|
|
|
97 |
MarkdownFile('query.md'),
|
98 |
Demo(
|
99 |
predict_query,
|
100 |
+
EX_Q,
|
|
|
|
|
101 |
[
|
102 |
gr.Dropdown(choices=['max', 'sum'], value='max', label='Aggregation'),
|
103 |
],
|
|
|
106 |
MarkdownFile('doc.md'),
|
107 |
Demo(
|
108 |
predict_doc,
|
109 |
+
EX_D,
|
|
|
|
|
110 |
[
|
111 |
gr.Dropdown(choices=['max', 'sum'], value='max', label='Aggregation'),
|
112 |
],
|
requirements.txt
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
torch
|
2 |
python-terrier
|
3 |
-
git+https://github.com/seanmacavaney/[email protected].
|
4 |
git+https://github.com/naver/splade
|
5 |
git+https://github.com/seanmacavaney/pyt_splade@misc
|
|
|
1 |
torch
|
2 |
python-terrier
|
3 |
+
git+https://github.com/seanmacavaney/[email protected].4
|
4 |
git+https://github.com/naver/splade
|
5 |
git+https://github.com/seanmacavaney/pyt_splade@misc
|