Spaces:
Sleeping
Sleeping
Ezhil
commited on
Commit
·
e0ec062
1
Parent(s):
0d5ed90
modified code
Browse files
model.py
CHANGED
|
@@ -5,7 +5,9 @@ from sklearn.linear_model import LogisticRegression
|
|
| 5 |
from sklearn.preprocessing import LabelEncoder
|
| 6 |
from sklearn.model_selection import train_test_split
|
| 7 |
import pandas as pd
|
| 8 |
-
|
|
|
|
|
|
|
| 9 |
# Load pre-trained Sentence Transformer model
|
| 10 |
model = SentenceTransformer('Alibaba-NLP/gte-base-en-v1.5', trust_remote_code=True)
|
| 11 |
|
|
|
|
| 5 |
from sklearn.preprocessing import LabelEncoder
|
| 6 |
from sklearn.model_selection import train_test_split
|
| 7 |
import pandas as pd
|
| 8 |
+
import os
|
| 9 |
+
# Set the Hugging Face cache directory to a writable location
|
| 10 |
+
os.environ["TRANSFORMERS_CACHE"] = "/tmp/huggingface_cache"
|
| 11 |
# Load pre-trained Sentence Transformer model
|
| 12 |
model = SentenceTransformer('Alibaba-NLP/gte-base-en-v1.5', trust_remote_code=True)
|
| 13 |
|