Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -34,41 +34,41 @@ if uploaded_zip_file is not None:
|
|
34 |
|
35 |
st.write(f"Temporary directory path: {temp_dir}")
|
36 |
|
37 |
-
if not subprocess_executed:
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
|
53 |
|
54 |
-
|
55 |
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
|
62 |
-
|
63 |
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
|
73 |
with zipfile.ZipFile(uploaded_zip_file, "r") as zip_ref:
|
74 |
zip_ref.extractall(temp_dir)
|
|
|
34 |
|
35 |
st.write(f"Temporary directory path: {temp_dir}")
|
36 |
|
37 |
+
# if not subprocess_executed:
|
38 |
+
# # Execute the subprocess commands only once
|
39 |
+
# command = "chmod +x install.sh"
|
40 |
+
# try:
|
41 |
+
# subprocess.run(command, shell=True, check=True)
|
42 |
+
# print("Script 'install.sh' has been made executable.")
|
43 |
+
# except subprocess.CalledProcessError as e:
|
44 |
+
# print(f"Error while making the script executable: {e}")
|
45 |
+
|
46 |
+
# command = "./install.sh"
|
47 |
+
# try:
|
48 |
+
# subprocess.run(command, shell=True, check=True)
|
49 |
+
# print("Script 'install.sh' has started running.")
|
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 |
|
73 |
with zipfile.ZipFile(uploaded_zip_file, "r") as zip_ref:
|
74 |
zip_ref.extractall(temp_dir)
|