PraneshJs commited on
Commit
875c1e6
·
verified ·
1 Parent(s): 2eebd4f

fixed system information issue

Browse files
Files changed (1) hide show
  1. app.py +13 -0
app.py CHANGED
@@ -1082,7 +1082,20 @@ with gr.Blocks(
1082
  """,
1083
  elem_id="footer"
1084
  )
 
 
 
 
 
 
 
 
1085
 
 
 
 
 
 
1086
  # Launch the app
1087
  if __name__ == "__main__":
1088
  print("🚀 Launching Gradio interface...")
 
1082
  """,
1083
  elem_id="footer"
1084
  )
1085
+ # FIXED: System info initialization function
1086
+ def initialize_system_info():
1087
+ """Initialize system information display"""
1088
+ try:
1089
+ return get_system_info()
1090
+ except Exception as e:
1091
+ print(f"⚠️ Error initializing system info: {str(e)}")
1092
+ return "⚠️ System information will be available after data loads completely."
1093
 
1094
+ # Load system info on startup (separate from admin mode)
1095
+ app.load(
1096
+ fn=initialize_system_info,
1097
+ outputs=system_output
1098
+ )
1099
  # Launch the app
1100
  if __name__ == "__main__":
1101
  print("🚀 Launching Gradio interface...")