Fix a few last paths for the new repo org (#8666)
This commit is contained in:
@@ -3,7 +3,7 @@ import json
|
||||
from typing import List
|
||||
|
||||
from ltp import LTP
|
||||
from transformers.tokenization_bert import BertTokenizer
|
||||
from transformers import BertTokenizer
|
||||
|
||||
|
||||
def _is_chinese_char(cp):
|
||||
|
||||
@@ -107,7 +107,12 @@ def make_support(question, source="wiki40b", method="dense", n_results=10):
|
||||
return question_doc, support_list
|
||||
|
||||
|
||||
@st.cache(hash_funcs={torch.Tensor: (lambda _: None), transformers.tokenization_bart.BartTokenizer: (lambda _: None)})
|
||||
@st.cache(
|
||||
hash_funcs={
|
||||
torch.Tensor: (lambda _: None),
|
||||
transformers.models.bart.tokenization_bart.BartTokenizer: (lambda _: None),
|
||||
}
|
||||
)
|
||||
def answer_question(
|
||||
question_doc, s2s_model, s2s_tokenizer, min_len=64, max_len=256, sampling=False, n_beams=2, top_p=0.95, temp=0.8
|
||||
):
|
||||
|
||||
Reference in New Issue
Block a user