chenglu commited on
Commit
ee48dec
1 Parent(s): 5f36c2e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
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')