Commit
·
ac92a10
1
Parent(s):
0a1de21
update
Browse files
app.py
CHANGED
|
@@ -120,12 +120,6 @@ if uploaded_file is not None:
|
|
| 120 |
#os.makedirs(osp(output_path, "result"), exist_ok=True)
|
| 121 |
#os.makedirs(osp(output_path, "mask"), exist_ok=True)
|
| 122 |
rc, stderr_output = run_bash_script(input_path, output_path, progress_placeholder, status_text)
|
| 123 |
-
file_namea = " || ".join(os.listdir(f'{temp_dir}/target_folder/mask'))
|
| 124 |
-
file_nameb = " || ".join(os.listdir(f'{temp_dir}/target_folder/bbox'))
|
| 125 |
-
file_namec = " || ".join(os.listdir(f'{temp_dir}/target_folder/result'))
|
| 126 |
-
st.write(file_namea)
|
| 127 |
-
st.write(file_nameb)
|
| 128 |
-
st.write(file_namec)
|
| 129 |
if rc == 0:
|
| 130 |
status_text.text("Text detection completed successfully!")
|
| 131 |
result_folder = os.path.join(output_path, "result")
|
|
@@ -140,6 +134,12 @@ if uploaded_file is not None:
|
|
| 140 |
file_name="text_detection_results.zip",
|
| 141 |
mime="application/zip"
|
| 142 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 143 |
else:
|
| 144 |
st.error("Result folder not found. The text detection might have failed.")
|
| 145 |
else:
|
|
|
|
| 120 |
#os.makedirs(osp(output_path, "result"), exist_ok=True)
|
| 121 |
#os.makedirs(osp(output_path, "mask"), exist_ok=True)
|
| 122 |
rc, stderr_output = run_bash_script(input_path, output_path, progress_placeholder, status_text)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
if rc == 0:
|
| 124 |
status_text.text("Text detection completed successfully!")
|
| 125 |
result_folder = os.path.join(output_path, "result")
|
|
|
|
| 134 |
file_name="text_detection_results.zip",
|
| 135 |
mime="application/zip"
|
| 136 |
)
|
| 137 |
+
file_namea = " || ".join(os.listdir(f'{temp_dir}/target_folder/mask'))
|
| 138 |
+
file_nameb = " || ".join(os.listdir(f'{temp_dir}/target_folder/bbox'))
|
| 139 |
+
file_namec = " || ".join(os.listdir(f'{temp_dir}/target_folder/result'))
|
| 140 |
+
st.write(file_namea)
|
| 141 |
+
st.write(file_nameb)
|
| 142 |
+
st.write(file_namec)
|
| 143 |
else:
|
| 144 |
st.error("Result folder not found. The text detection might have failed.")
|
| 145 |
else:
|