Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,15 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
from fastapi import FastAPI, UploadFile, File
|
2 |
from fastapi.middleware.cors import CORSMiddleware
|
3 |
-
|
4 |
-
|
5 |
-
from huggingface_hub import list_repo_files, hf_hub_download, upload_file
|
6 |
import os
|
7 |
import os
|
8 |
import zipfile
|
9 |
import tempfile # ✅ Add this!
|
10 |
-
|
11 |
-
|
12 |
-
os.makedirs("/tmp/hf_cache", exist_ok=True)
|
13 |
|
14 |
|
15 |
app = FastAPI()
|
|
|
1 |
+
|
2 |
+
|
3 |
+
import os
|
4 |
+
os.environ["HF_HOME"] = "/tmp/hf_cache"
|
5 |
+
os.makedirs("/tmp/hf_cache", exist_ok=True)
|
6 |
+
|
7 |
+
from fastapi import FastAPI, Query
|
8 |
+
from huggingface_hub import list_repo_files, hf_hub_download, upload_file
|
9 |
+
import io
|
10 |
+
|
11 |
from fastapi import FastAPI, UploadFile, File
|
12 |
from fastapi.middleware.cors import CORSMiddleware
|
13 |
+
|
14 |
+
|
|
|
15 |
import os
|
16 |
import os
|
17 |
import zipfile
|
18 |
import tempfile # ✅ Add this!
|
19 |
+
|
20 |
+
|
|
|
21 |
|
22 |
|
23 |
app = FastAPI()
|