LogicGoInfotechSpaces commited on
Commit
c557649
·
1 Parent(s): 0340b9d

Expose global 'app' for Spaces launcher (fix startup check)

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -181,9 +181,11 @@ def build_ui() -> gr.Blocks:
181
  return demo
182
 
183
 
 
 
 
184
  if __name__ == "__main__":
185
- app = build_ui()
186
- # On Spaces, the port/host are managed by the platform; run local defaults otherwise
187
  app.launch()
188
 
189
 
 
181
  return demo
182
 
183
 
184
+ # Expose a top-level Gradio app for Hugging Face Spaces
185
+ app = build_ui()
186
+
187
  if __name__ == "__main__":
188
+ # Local run. On Spaces, the platform launches the app automatically.
 
189
  app.launch()
190
 
191