app.py
CHANGED
@@ -8,8 +8,10 @@ app = FastAPI()
|
|
8 |
from huggingface_hub import login
|
9 |
|
10 |
import os
|
|
|
|
|
11 |
# Login with token from environment
|
12 |
-
login(token=os.getenv("HF_TOKEN"),
|
13 |
# app = Flask(__name__)
|
14 |
# cors = CORS(app, resources={r"*": {"origins": "*"}})
|
15 |
from recommendwithhist import recommend_movieswithhistory
|
|
|
8 |
from huggingface_hub import login
|
9 |
|
10 |
import os
|
11 |
+
cache_dir = '/tmp/hf_cache'
|
12 |
+
os.makedirs(cache_dir, exist_ok=True)
|
13 |
# Login with token from environment
|
14 |
+
login(token=os.getenv("HF_TOKEN"),cache_dir=cache_dir)
|
15 |
# app = Flask(__name__)
|
16 |
# cors = CORS(app, resources={r"*": {"origins": "*"}})
|
17 |
from recommendwithhist import recommend_movieswithhistory
|