Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -6,11 +6,9 @@ from transformers import BartTokenizer, BartForConditionalGeneration, AutoModel,
|
|
6 |
bart_tokenizer = BartTokenizer.from_pretrained('facebook/bart-large')
|
7 |
bart_model = BartForConditionalGeneration.from_pretrained('webshop/il_search_bart')
|
8 |
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
bert_model = AutoModel.from_pretrained('webshop/il_choice_bert')
|
13 |
-
|
14 |
|
15 |
def process_str(s):
|
16 |
s = s.lower().replace('"', '').replace("'", "").strip()
|
|
|
6 |
bart_tokenizer = BartTokenizer.from_pretrained('facebook/bart-large')
|
7 |
bart_model = BartForConditionalGeneration.from_pretrained('webshop/il_search_bart')
|
8 |
|
9 |
+
bert_tokenizer = AutoTokenizer.from_pretrained('bert-base-uncased', truncation_side='left')
|
10 |
+
bert_tokenizer.add_tokens(['[button]', '[button_]', '[clicked button]', '[clicked button_]'], special_tokens=True)
|
11 |
+
bert_model = AutoModel.from_pretrained('webshop/il-choice-bert-image_0', trust_remote_code=True)
|
|
|
|
|
12 |
|
13 |
def process_str(s):
|
14 |
s = s.lower().replace('"', '').replace("'", "").strip()
|