Spaces:
Sleeping
Sleeping
Refactor build_ui function to register model load event inside context for improved clarity
Browse files
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 |
-
#
|
| 262 |
demo.load(_post_load, inputs=None, outputs=status_box)
|
| 263 |
|
| 264 |
-
|
| 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__":
|