UniquePratham commited on
Commit
7d9d109
1 Parent(s): 6d45878

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -154,8 +154,8 @@ predict_button = st.sidebar.button("Predict")
154
  # Main columns
155
  col1, col2 = st.columns([2, 1])
156
 
157
- cleaned_text=""
158
- polished_text=""
159
 
160
  # Display image preview
161
  if uploaded_file:
@@ -226,7 +226,6 @@ if uploaded_file:
226
  st.session_state.cleaned_text = cleaned_text
227
  st.session_state.polished_text = polished_text
228
 
229
- if os.path.exists(result_path) and st.session_state.cleaned_text != "" and st.session_state.polished_text != "":
230
  # Display extracted text
231
  st.subheader("Extracted Text (Cleaned & Polished)")
232
  st.markdown(st.session_state.cleaned_text, unsafe_allow_html=True)
 
154
  # Main columns
155
  col1, col2 = st.columns([2, 1])
156
 
157
+ cleaned_text = ""
158
+ polished_text = ""
159
 
160
  # Display image preview
161
  if uploaded_file:
 
226
  st.session_state.cleaned_text = cleaned_text
227
  st.session_state.polished_text = polished_text
228
 
 
229
  # Display extracted text
230
  st.subheader("Extracted Text (Cleaned & Polished)")
231
  st.markdown(st.session_state.cleaned_text, unsafe_allow_html=True)