Sean MacAvaney commited on
Commit
3592e17
·
1 Parent(s): 432f049
Files changed (1) hide show
  1. app.py +14 -0
app.py CHANGED
@@ -7,6 +7,20 @@ 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, df2list
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  factory_max = pyt_splade.Splade(agg='max')
11
  factory_sum = pyt_splade.Splade(agg='sum')
12
 
 
7
  pt.init()
8
  import pyt_splade
9
  from pyterrier_gradio import Demo, MarkdownFile, interface, df2code, code2md, EX_Q, EX_D, df2list
10
+ from transformers import AutoTokenizer, AutoModel
11
+ import os
12
+ os.environ["HF_ENDPOINT"] = "https://huggingface.co"
13
+
14
+ _ = AutoModel.from_pretrained(
15
+ "naver/splade-cocondenser-ensembledistil",
16
+ trust_remote_code=True
17
+ )
18
+
19
+ _ = AutoTokenizer.from_pretrained(
20
+ "naver/splade-cocondenser-ensembledistil",
21
+ trust_remote_code=True
22
+ )
23
+
24
  factory_max = pyt_splade.Splade(agg='max')
25
  factory_sum = pyt_splade.Splade(agg='sum')
26