pskeshu Claude commited on
Commit
360e533
Β·
1 Parent(s): 002b4c1

πŸ› Fix indentation error in app.py

Browse files

Remove duplicate try-except blocks and fix code alignment to resolve
IndentationError on line 346.

πŸ€– Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

Files changed (1) hide show
  1. app.py +12 -15
app.py CHANGED
@@ -338,23 +338,20 @@ if current_image is not None:
338
  # Clear any running status messages on error
339
  for stage_key in stage_statuses:
340
  stage_statuses[stage_key].empty()
341
- raise e
 
 
 
 
342
 
343
  st.markdown('</div>', unsafe_allow_html=True)
344
-
345
- # Cleanup
346
- if 'temp_path' in locals() and os.path.exists(temp_path):
347
- try:
348
- os.remove(temp_path)
349
- except:
350
- pass
351
-
352
- except Exception as e:
353
- error_msg = f"Analysis failed: {str(e)}"
354
- logger.error(error_msg)
355
- logger.error(f"Full traceback: {traceback.format_exc()}")
356
- st.error(error_msg)
357
- st.code(traceback.format_exc())
358
  else:
359
  st.markdown('<div class="upload-section">', unsafe_allow_html=True)
360
  st.markdown("**Upload an image or select a sample to begin analysis**")
 
338
  # Clear any running status messages on error
339
  for stage_key in stage_statuses:
340
  stage_statuses[stage_key].empty()
341
+ error_msg = f"Analysis failed: {str(e)}"
342
+ logger.error(error_msg)
343
+ logger.error(f"Full traceback: {traceback.format_exc()}")
344
+ st.error(error_msg)
345
+ st.code(traceback.format_exc())
346
 
347
  st.markdown('</div>', unsafe_allow_html=True)
348
+
349
+ # Cleanup
350
+ if 'temp_path' in locals() and os.path.exists(temp_path):
351
+ try:
352
+ os.remove(temp_path)
353
+ except:
354
+ pass
 
 
 
 
 
 
 
355
  else:
356
  st.markdown('<div class="upload-section">', unsafe_allow_html=True)
357
  st.markdown("**Upload an image or select a sample to begin analysis**")