Spaces:
Runtime error
Runtime error
Commit
·
5e0bbc5
1
Parent(s):
3369b7c
deploy
Browse files- Dockerfile +1 -0
- service/prediction_service.py +1 -1
Dockerfile
CHANGED
|
@@ -7,6 +7,7 @@ WORKDIR /app
|
|
| 7 |
# Copy all files to the container
|
| 8 |
COPY . /app
|
| 9 |
|
|
|
|
| 10 |
# Set HF_HOME to use an accessible cache directory
|
| 11 |
ENV HF_HOME=/app/.cache
|
| 12 |
RUN mkdir -p /app/.cache && chmod -R 777 /app/.cache
|
|
|
|
| 7 |
# Copy all files to the container
|
| 8 |
COPY . /app
|
| 9 |
|
| 10 |
+
|
| 11 |
# Set HF_HOME to use an accessible cache directory
|
| 12 |
ENV HF_HOME=/app/.cache
|
| 13 |
RUN mkdir -p /app/.cache && chmod -R 777 /app/.cache
|
service/prediction_service.py
CHANGED
|
@@ -9,7 +9,7 @@ hf_token = os.getenv('HF_TOKEN')
|
|
| 9 |
# Hugging Face Model ID and local model directory
|
| 10 |
hf_model_id = 'Alibaba-NLP/gte-base-en-v1.5'
|
| 11 |
model_dir = '/tmp/sentence_transformer' # Use /tmp for write permissions
|
| 12 |
-
clf_model_path = '/
|
| 13 |
|
| 14 |
# Create model directory if not exists
|
| 15 |
os.makedirs(model_dir, exist_ok=True)
|
|
|
|
| 9 |
# Hugging Face Model ID and local model directory
|
| 10 |
hf_model_id = 'Alibaba-NLP/gte-base-en-v1.5'
|
| 11 |
model_dir = '/tmp/sentence_transformer' # Use /tmp for write permissions
|
| 12 |
+
clf_model_path = 'models/logistic_regression_model.pkl'
|
| 13 |
|
| 14 |
# Create model directory if not exists
|
| 15 |
os.makedirs(model_dir, exist_ok=True)
|