File size: 299 Bytes
e8b4369
 
 
 
 
 
 
fcae93c
8fa33c0
fcae93c
22dcdf9
 
e8b4369
22dcdf9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# app.py
import os
from fastapi import FastAPI
from huggingface_hub import login

os.environ["HUGGINGFACE_HUB_CACHE"] = "/tmp/.cache"
os.environ["HF_HOME"] = "/tmp/.cache"

app = FastAPI()

@app.get("/")
def root():
    login(os.environ.get("HUGGINGFACE_HUB_TOKEN", ""))
    return {"status": "ok"}