Commit
·
f25211b
1
Parent(s):
13c174c
update
Browse files
app.py
CHANGED
@@ -81,9 +81,9 @@ if uploaded_file is not None:
|
|
81 |
# Save the uploaded file temporarily
|
82 |
input_path = "test_folder"
|
83 |
output_path = "target_test"
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
|
88 |
input_file_path = os.path.join(input_path, uploaded_file.name)
|
89 |
image = Image.open(uploaded_file)
|
@@ -95,9 +95,9 @@ if uploaded_file is not None:
|
|
95 |
|
96 |
try:
|
97 |
status_text.text("Running text detection...")
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
rc, stderr_output = run_bash_script(input_path, output_path, progress_placeholder, status_text)
|
102 |
|
103 |
if rc == 0:
|
|
|
81 |
# Save the uploaded file temporarily
|
82 |
input_path = "test_folder"
|
83 |
output_path = "target_test"
|
84 |
+
os.makedirs(input_path, exist_ok=True)
|
85 |
+
os.makedirs(osp(output_path, "result"), exist_ok=True)
|
86 |
+
os.makedirs(osp(output_path, "mask"), exist_ok=True)
|
87 |
|
88 |
input_file_path = os.path.join(input_path, uploaded_file.name)
|
89 |
image = Image.open(uploaded_file)
|
|
|
95 |
|
96 |
try:
|
97 |
status_text.text("Running text detection...")
|
98 |
+
os.makedirs(input_path, exist_ok=True)
|
99 |
+
os.makedirs(osp(output_path, "result"), exist_ok=True)
|
100 |
+
os.makedirs(osp(output_path, "mask"), exist_ok=True)
|
101 |
rc, stderr_output = run_bash_script(input_path, output_path, progress_placeholder, status_text)
|
102 |
|
103 |
if rc == 0:
|