Update app.py
Browse files
app.py
CHANGED
|
@@ -14,15 +14,15 @@ import os
|
|
| 14 |
# 1) 앱 및 모델 초기화
|
| 15 |
#####################################
|
| 16 |
app = FastAPI()
|
| 17 |
-
os
|
| 18 |
-
|
| 19 |
-
os.environ["
|
| 20 |
-
os.environ["HF_HUB_CACHE"] = "/
|
| 21 |
-
os.environ["
|
| 22 |
-
|
| 23 |
# 🟢 (A) 모델 로딩
|
| 24 |
print("Loading SentenceTransformer model...)")
|
| 25 |
-
model = SentenceTransformer("sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2"
|
| 26 |
print("Model loaded.")
|
| 27 |
|
| 28 |
# 🟢 (B) 예시 아이템 목록
|
|
|
|
| 14 |
# 1) 앱 및 모델 초기화
|
| 15 |
#####################################
|
| 16 |
app = FastAPI()
|
| 17 |
+
import os
|
| 18 |
+
|
| 19 |
+
os.environ["HF_HOME"] = "/workspace/huggingface_cache"
|
| 20 |
+
os.environ["HF_HUB_CACHE"] = "/workspace/huggingface_cache"
|
| 21 |
+
os.environ["TRANSFORMERS_CACHE"] = "/workspace/huggingface_cache"
|
| 22 |
+
|
| 23 |
# 🟢 (A) 모델 로딩
|
| 24 |
print("Loading SentenceTransformer model...)")
|
| 25 |
+
model = SentenceTransformer("sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2")
|
| 26 |
print("Model loaded.")
|
| 27 |
|
| 28 |
# 🟢 (B) 예시 아이템 목록
|