VirusDumb commited on
Commit
7e85e6a
·
1 Parent(s): 2e5f3de

First pass

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -60,8 +60,8 @@ def generate_image(photo_b64: str, art_style: str, scene_prompt: str, seed: int)
60
  return pil_to_data_url(img)
61
 
62
 
63
- # Expose the launchable under the name the HF Gradio runner looks for.
64
- demo = app
65
-
66
  if __name__ == "__main__":
67
  app.launch(show_error=True, ssr_mode=False)
 
60
  return pil_to_data_url(img)
61
 
62
 
63
+ # Official gr.Server pattern: NO `demo` variable. Launch the Server instance directly under
64
+ # the __main__ guard; app.launch() blocks and keeps the process alive. Defining `demo = app`
65
+ # makes the HF runner try to host it as a Blocks too -> double launch -> the app reload-loops.
66
  if __name__ == "__main__":
67
  app.launch(show_error=True, ssr_mode=False)