First pass
Browse files
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 |
-
#
|
| 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)
|