Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -50,6 +50,23 @@ if uploaded_zip_file is not None:
|
|
50 |
except subprocess.CalledProcessError as e:
|
51 |
print(f"Error while running the script: {e}")
|
52 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
# Set the flag to indicate that subprocess commands have been executed
|
54 |
subprocess_executed = True
|
55 |
|
|
|
50 |
except subprocess.CalledProcessError as e:
|
51 |
print(f"Error while running the script: {e}")
|
52 |
|
53 |
+
|
54 |
+
command = "chmod +x inference.sh"
|
55 |
+
|
56 |
+
try:
|
57 |
+
subprocess.run(command, shell=True, check=True)
|
58 |
+
print("Script 'inference.sh' has started running.")
|
59 |
+
except subprocess.CalledProcessError as e:
|
60 |
+
print(f"Error while making the script executable: {e}")
|
61 |
+
|
62 |
+
command = "./inference.sh"
|
63 |
+
|
64 |
+
try:
|
65 |
+
subprocess.run(command, shell=True, check=True)
|
66 |
+
print("Script 'inference.sh' has started running.")
|
67 |
+
except subprocess.CalledProcessError as e:
|
68 |
+
print(f"Error while making the script executable: {e}")
|
69 |
+
|
70 |
# Set the flag to indicate that subprocess commands have been executed
|
71 |
subprocess_executed = True
|
72 |
|