Hermes Bot Nanoboozhoo commited on
Commit
c765646
·
unverified ·
1 Parent(s): 9fba39f

fix: export app at module level — remove double-launch on HF Spaces

Browse files

Remove if __name__ == '__main__' app.launch block.
HF Spaces Gradio SDK launches app once on import.

Co-Authored-By: Nanoboozhoo <nanoboozhoo@git-aaaki>

Files changed (1) hide show
  1. app.py +3 -12
app.py CHANGED
@@ -1051,16 +1051,7 @@ def create_app() -> gr.Blocks:
1051
 
1052
 
1053
  # ---------------------------------------------------------------------------
1054
- # Entry point
1055
  # ---------------------------------------------------------------------------
1056
- if __name__ == "__main__":
1057
- app = create_app()
1058
- app.launch(
1059
- server_name="0.0.0.0",
1060
- server_port=int(os.environ.get("PORT", "7861")),
1061
- share=False,
1062
- show_error=True,
1063
- mcp_server=True,
1064
- css=FOCUSFRIEND_CSS,
1065
- head=FOCUSFRIEND_JS,
1066
- )
 
1051
 
1052
 
1053
  # ---------------------------------------------------------------------------
 
1054
  # ---------------------------------------------------------------------------
1055
+ # Entry point — exported for HF Spaces Gradio SDK
1056
+ # ---------------------------------------------------------------------------
1057
+ app = create_app()