Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -12,6 +12,9 @@ from nltk.corpus import stopwords
|
|
12 |
from datasets import load_dataset
|
13 |
from sentence_transformers import SentenceTransformer, util
|
14 |
from retry import retry
|
|
|
|
|
|
|
15 |
|
16 |
# 确保已下载 nltk 的停用词
|
17 |
nltk.download('stopwords')
|
|
|
12 |
from datasets import load_dataset
|
13 |
from sentence_transformers import SentenceTransformer, util
|
14 |
from retry import retry
|
15 |
+
from transformers import pipeline
|
16 |
+
|
17 |
+
pipe = pipeline("translation", model="Helsinki-NLP/opus-mt-en-es")
|
18 |
|
19 |
# 确保已下载 nltk 的停用词
|
20 |
nltk.download('stopwords')
|