yerang commited on
Commit
03e69dc
·
verified ·
1 Parent(s): 2efd087

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -17
app.py CHANGED
@@ -14,28 +14,11 @@ print(zero.device) # <-- 'cpu' 🤔
14
  def greet(n):
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/stf/')
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()
37
 
38
-
39
  sys.path.append('/home/user/.local/lib/python3.10/site-packages')
40
  sys.path.append('/home/user/.local/lib/python3.10/site-packages/stf_alternative/src/stf_alternative')
41
  sys.path.append('/home/user/.local/lib/python3.10/site-packages/stf_tools/src/stf_tools')
@@ -55,6 +38,22 @@ def greet(n):
55
 
56
  from stf_utils import STFPipeline
57
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
 
59
 
60
 
 
14
  def greet(n):
15
  print(zero.device) # <-- 'cuda:0' 🤗
16
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
 
18
 
19
 
20
  initialize_environment()
21
 
 
22
  sys.path.append('/home/user/.local/lib/python3.10/site-packages')
23
  sys.path.append('/home/user/.local/lib/python3.10/site-packages/stf_alternative/src/stf_alternative')
24
  sys.path.append('/home/user/.local/lib/python3.10/site-packages/stf_tools/src/stf_tools')
 
38
 
39
  from stf_utils import STFPipeline
40
 
41
+
42
+
43
+ file_id=os.getenv('DOWNLOAD_1')
44
+ url = f"https://drive.google.com/uc?id={file_id}"
45
+ gdown.download(url, '/tmp/stf-api-alternative.zip', quiet=False)
46
+ zipfile.ZipFile('/tmp/stf-api-alternative.zip', 'r').extractall('/tmp/stf/')
47
+
48
+ file_id=os.getenv('DOWNLOAD_2')
49
+ url = f"https://drive.google.com/uc?id={file_id}"
50
+ gdown.download(url, '/tmp/stf/089.pth', quiet=False)
51
+
52
+
53
+ file_id=os.getenv('DOWNLOAD_3')
54
+ url = f"https://drive.google.com/uc?id={file_id}"
55
+ gdown.download(url, '/tmp/stf/TEMP/0157.pth', quiet=False)
56
+
57
 
58
 
59