Spaces:
Running
Running
update
Browse files- app.py +1 -0
- requirements.txt +1 -1
app.py
CHANGED
|
@@ -5,6 +5,7 @@ from transformers import AutoTokenizer, AutoModel, MarianMTModel, MarianTokenize
|
|
| 5 |
from sklearn.metrics.pairwise import cosine_similarity
|
| 6 |
import re
|
| 7 |
from huggingface_hub import hf_hub_download
|
|
|
|
| 8 |
# ========== 模型加载 ==========
|
| 9 |
embedding_model_name = "BAAI/bge-small-en"
|
| 10 |
tokenizer = AutoTokenizer.from_pretrained(embedding_model_name)
|
|
|
|
| 5 |
from sklearn.metrics.pairwise import cosine_similarity
|
| 6 |
import re
|
| 7 |
from huggingface_hub import hf_hub_download
|
| 8 |
+
import torch
|
| 9 |
# ========== 模型加载 ==========
|
| 10 |
embedding_model_name = "BAAI/bge-small-en"
|
| 11 |
tokenizer = AutoTokenizer.from_pretrained(embedding_model_name)
|
requirements.txt
CHANGED
|
@@ -3,4 +3,4 @@ transformers
|
|
| 3 |
gradio
|
| 4 |
scikit-learn
|
| 5 |
sentencepiece
|
| 6 |
-
huggingface_hub
|
|
|
|
| 3 |
gradio
|
| 4 |
scikit-learn
|
| 5 |
sentencepiece
|
| 6 |
+
huggingface_hub
|