Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -15,18 +15,22 @@ def greet(n):
|
|
| 15 |
print(zero.device) # <-- 'cuda:0' ๐ค
|
| 16 |
|
| 17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
-
|
| 20 |
-
#file_id = 'your_file_id_here'
|
| 21 |
-
file_id=os.getenv('ZIPFILE_ID')
|
| 22 |
url = f"https://drive.google.com/uc?id={file_id}"
|
|
|
|
| 23 |
|
| 24 |
-
# ํ์ผ ๋ค์ด๋ก๋
|
| 25 |
-
gdown.download(url, '/tmp/stf.zip', quiet=False)
|
| 26 |
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
|
|
|
| 30 |
|
| 31 |
|
| 32 |
initialize_environment()
|
|
|
|
| 15 |
print(zero.device) # <-- 'cuda:0' ๐ค
|
| 16 |
|
| 17 |
|
| 18 |
+
file_id=os.getenv('DOWNLOAD_1')
|
| 19 |
+
url = f"https://drive.google.com/uc?id={file_id}"
|
| 20 |
+
gdown.download(url, '/tmp/stf-api-alternative.zip', quiet=False)
|
| 21 |
+
dir_zip= os.path.join(root_path, '/tmp/stf-api-alternative.zip')
|
| 22 |
+
dir_target=os.path.join(root_path,'/tmp/')
|
| 23 |
+
zipfile.ZipFile(dir_zip, 'r').extractall(dir_target)
|
| 24 |
|
| 25 |
+
file_id=os.getenv('DOWNLOAD_2')
|
|
|
|
|
|
|
| 26 |
url = f"https://drive.google.com/uc?id={file_id}"
|
| 27 |
+
gdown.download(url, '/tmp/stf/089.pth', quiet=False)
|
| 28 |
|
|
|
|
|
|
|
| 29 |
|
| 30 |
+
file_id=os.getenv('DOWNLOAD_3')
|
| 31 |
+
url = f"https://drive.google.com/uc?id={file_id}"
|
| 32 |
+
gdown.download(url, '/tmp/stf/TEMP/0157.pth', quiet=False)
|
| 33 |
+
|
| 34 |
|
| 35 |
|
| 36 |
initialize_environment()
|