Spaces:
Runtime error
Runtime error
YanshekWoo
commited on
Commit
•
ace8906
1
Parent(s):
e17aa82
update tokenizer class
Browse files
app.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
import gradio as gr
|
2 |
from typing import List, Optional
|
3 |
-
from transformers import BertTokenizer, BartForConditionalGeneration
|
4 |
|
5 |
title = "HIT-TMG/dialogue-bart-large-chinese"
|
6 |
description = """
|
@@ -11,7 +11,8 @@ Besides starting the conversation from scratch, you can also input the whole dia
|
|
11 |
"""
|
12 |
|
13 |
|
14 |
-
tokenizer = BertTokenizer.from_pretrained("HIT-TMG/dialogue-bart-large-chinese")
|
|
|
15 |
model = BartForConditionalGeneration.from_pretrained("HIT-TMG/dialogue-bart-large-chinese")
|
16 |
|
17 |
tokenizer.truncation_side = 'left'
|
|
|
1 |
import gradio as gr
|
2 |
from typing import List, Optional
|
3 |
+
from transformers import AutoTokenizer, BertTokenizer, BartForConditionalGeneration
|
4 |
|
5 |
title = "HIT-TMG/dialogue-bart-large-chinese"
|
6 |
description = """
|
|
|
11 |
"""
|
12 |
|
13 |
|
14 |
+
# tokenizer = BertTokenizer.from_pretrained("HIT-TMG/dialogue-bart-large-chinese")
|
15 |
+
tokenizer = AutoTokenizer.from_pretrained("HIT-TMG/dialogue-bart-large-chinese")
|
16 |
model = BartForConditionalGeneration.from_pretrained("HIT-TMG/dialogue-bart-large-chinese")
|
17 |
|
18 |
tokenizer.truncation_side = 'left'
|