Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -8,15 +8,14 @@ os.environ["OPENBLAS_NUM_THREADS"] = "1"
|
|
8 |
os.environ["no_proxy"] = "localhost, 127.0.0.1, ::1"
|
9 |
|
10 |
# Download models
|
11 |
-
import subprocess
|
12 |
shell_script = './tools/dlmodels.sh'
|
|
|
13 |
try:
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
print(f"Shell script not found: {shell_script}")
|
20 |
except Exception as e:
|
21 |
print(f"An error occurred: {e}")
|
22 |
|
|
|
8 |
os.environ["no_proxy"] = "localhost, 127.0.0.1, ::1"
|
9 |
|
10 |
# Download models
|
|
|
11 |
shell_script = './tools/dlmodels.sh'
|
12 |
+
|
13 |
try:
|
14 |
+
return_code = os.system(shell_script)
|
15 |
+
if return_code == 0:
|
16 |
+
print("Shell script executed successfully.")
|
17 |
+
else:
|
18 |
+
print(f"Shell script failed with return code {return_code}")
|
|
|
19 |
except Exception as e:
|
20 |
print(f"An error occurred: {e}")
|
21 |
|