Spaces:
Sleeping
Sleeping
Commit
·
67e4602
1
Parent(s):
8086503
nothing
Browse files- Dockerfile +1 -1
- app.py +1 -2
Dockerfile
CHANGED
|
@@ -5,7 +5,7 @@ FROM python:3.11-slim
|
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
# Set HF cache inside container
|
| 8 |
-
ENV HF_HUB_CACHE=/
|
| 9 |
|
| 10 |
# Copy requirements and install
|
| 11 |
COPY requirements.txt .
|
|
|
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
# Set HF cache inside container
|
| 8 |
+
ENV HF_HUB_CACHE=/tmp/hf_cache
|
| 9 |
|
| 10 |
# Copy requirements and install
|
| 11 |
COPY requirements.txt .
|
app.py
CHANGED
|
@@ -6,11 +6,10 @@ from PIL import Image
|
|
| 6 |
from flask import Flask, request, jsonify
|
| 7 |
from flask_cors import CORS
|
| 8 |
import io
|
| 9 |
-
import os
|
| 10 |
from huggingface_hub import hf_hub_download
|
| 11 |
|
| 12 |
# Set Hugging Face cache to a folder inside the container
|
| 13 |
-
os.environ['HF_HUB_CACHE'] = '/
|
| 14 |
|
| 15 |
# Initialize Flask app
|
| 16 |
app = Flask(__name__)
|
|
|
|
| 6 |
from flask import Flask, request, jsonify
|
| 7 |
from flask_cors import CORS
|
| 8 |
import io
|
|
|
|
| 9 |
from huggingface_hub import hf_hub_download
|
| 10 |
|
| 11 |
# Set Hugging Face cache to a folder inside the container
|
| 12 |
+
os.environ['HF_HUB_CACHE'] = '/tmp/hf_cache'
|
| 13 |
|
| 14 |
# Initialize Flask app
|
| 15 |
app = Flask(__name__)
|