PrashanthB461 commited on
Commit
ba21352
·
verified ·
1 Parent(s): 0723f0c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -1
app.py CHANGED
@@ -639,4 +639,16 @@ def create_interface():
639
  else:
640
  if attendance_system.last_processed_frame is not None:
641
  final_frame = cv2.cvtColor(attendance_system.last_processed_frame, cv2.COLOR_BGR2RGB)
642
- final_log_md = "\n".join(reversed(attendance_system.final_log)) or
 
 
 
 
 
 
 
 
 
 
 
 
 
639
  else:
640
  if attendance_system.last_processed_frame is not None:
641
  final_frame = cv2.cvtColor(attendance_system.last_processed_frame, cv2.COLOR_BGR2RGB)
642
+ final_log_md = "\n".join(reversed(attendance_system.final_log)) or "Processing complete. No log entries."
643
+ yield final_frame, final_log_md
644
+ else:
645
+ yield None, "System stopped. Go to 'Controls & Status' to start."
646
+ time.sleep(0.1)
647
+
648
+ demo.load(fn=update_ui_generator, outputs=[video_output, session_log_display])
649
+ return demo
650
+
651
+ if __name__ == "__main__":
652
+ app = create_interface()
653
+ app.queue()
654
+ app.launch(server_name="0.0.0.0", server_port=7860, show_error=True, debug=True)