Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -49,7 +49,16 @@ if uploaded_zip_file is not None:
|
|
49 |
# Run the command
|
50 |
command = f"bin/C2C spine -i {temp_dir}"
|
51 |
st.write("Running command:", command)
|
52 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
|
54 |
except Exception as e:
|
55 |
st.error(f"Error: {str(e)}")
|
|
|
49 |
# Run the command
|
50 |
command = f"bin/C2C spine -i {temp_dir}"
|
51 |
st.write("Running command:", command)
|
52 |
+
|
53 |
+
progress_bar = st.progress(0) # Initialize the progress bar
|
54 |
+
process = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True)
|
55 |
+
|
56 |
+
for line in process.stdout:
|
57 |
+
st.text(line.strip())
|
58 |
+
progress = line.strip().split()
|
59 |
+
if progress and progress[0].isdigit():
|
60 |
+
percent_done = int(progress[0])
|
61 |
+
progress_bar.progress(percent_done)
|
62 |
|
63 |
except Exception as e:
|
64 |
st.error(f"Error: {str(e)}")
|