Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -5,11 +5,11 @@ from transformers import pipeline
|
|
5 |
from sentence_transformers import SentenceTransformer, util
|
6 |
import sys
|
7 |
|
8 |
-
HISTORY_WEIGHT =
|
9 |
|
10 |
@st.cache(allow_output_mutation=True, suppress_st_warning=True)
|
11 |
def get_model(model):
|
12 |
-
return pipeline("fill-mask", model=model, top_k=
|
13 |
|
14 |
def hash_func(inp):
|
15 |
return True
|
|
|
5 |
from sentence_transformers import SentenceTransformer, util
|
6 |
import sys
|
7 |
|
8 |
+
HISTORY_WEIGHT = 80 # set history weight (if found any keyword from history, it will priorities based on its weight)
|
9 |
|
10 |
@st.cache(allow_output_mutation=True, suppress_st_warning=True)
|
11 |
def get_model(model):
|
12 |
+
return pipeline("fill-mask", model=model, top_k=5)#s5t the maximum of tokens to be retrieved after each inference to model
|
13 |
|
14 |
def hash_func(inp):
|
15 |
return True
|