tasal9 commited on
Commit
6e7d264
·
1 Parent(s): c1f2553

Refactor build_ui function to register model load event inside context for improved clarity

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -258,10 +258,10 @@ def build_ui():
258
  # Model load banner shown after interface loads (async)
259
  def _post_load():
260
  return "✅ Model interface ready. If this is the first run and model wasn't cached, initial generation may still warm up."
261
- # 'every' parameter not supported in current Gradio version; remove it.
262
  demo.load(_post_load, inputs=None, outputs=status_box)
263
 
264
- return demo
265
 
266
 
267
  if __name__ == "__main__":
 
258
  # Model load banner shown after interface loads (async)
259
  def _post_load():
260
  return "✅ Model interface ready. If this is the first run and model wasn't cached, initial generation may still warm up."
261
+ # Register load event inside context
262
  demo.load(_post_load, inputs=None, outputs=status_box)
263
 
264
+ return demo
265
 
266
 
267
  if __name__ == "__main__":