Spaces:
Running
Running
UniquePratham
commited on
Commit
β’
6352a57
1
Parent(s):
bc75943
Update app.py
Browse files
app.py
CHANGED
@@ -11,6 +11,11 @@ from st_keyup import st_keyup
|
|
11 |
from st_img_pastebutton import paste
|
12 |
from text_highlighter import text_highlighter
|
13 |
|
|
|
|
|
|
|
|
|
|
|
14 |
# Page configuration
|
15 |
st.set_page_config(page_title="DualTextOCRFusion",
|
16 |
page_icon="π", layout="wide")
|
@@ -174,13 +179,6 @@ if uploaded_file:
|
|
174 |
os.makedirs(results_dir, exist_ok=True)
|
175 |
result_path = os.path.join(
|
176 |
results_dir, "temp_file_result.json" if clipboard_use else f"{uploaded_file.name}_result.json")
|
177 |
-
|
178 |
-
# Display extracted text
|
179 |
-
if 'cleaned_text' not in st.session_state:
|
180 |
-
st.session_state.cleaned_text = ""
|
181 |
-
if 'polished_text' not in st.session_state:
|
182 |
-
st.session_state.polished_text = ""
|
183 |
-
|
184 |
# Handle predictions
|
185 |
if predict_button:
|
186 |
if os.path.exists(result_path):
|
|
|
11 |
from st_img_pastebutton import paste
|
12 |
from text_highlighter import text_highlighter
|
13 |
|
14 |
+
if 'cleaned_text' not in st.session_state:
|
15 |
+
st.session_state.cleaned_text = ""
|
16 |
+
if 'polished_text' not in st.session_state:
|
17 |
+
st.session_state.polished_text = ""
|
18 |
+
|
19 |
# Page configuration
|
20 |
st.set_page_config(page_title="DualTextOCRFusion",
|
21 |
page_icon="π", layout="wide")
|
|
|
179 |
os.makedirs(results_dir, exist_ok=True)
|
180 |
result_path = os.path.join(
|
181 |
results_dir, "temp_file_result.json" if clipboard_use else f"{uploaded_file.name}_result.json")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
182 |
# Handle predictions
|
183 |
if predict_button:
|
184 |
if os.path.exists(result_path):
|