3morrrrr commited on
Commit
5f06391
·
verified ·
1 Parent(s): 43cbd10

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -301,6 +301,9 @@ api_interface = gr.Interface(
301
  api_name="/generate_handwriting_wrapper", # 👈 this registers the endpoint
302
  title="Handwriting API Endpoint",
303
  description="Programmatic access for handwriting generation."
 
 
 
304
  if __name__ == "__main__":
305
  # Set port based on environment variable or default to 7860
306
  port = int(os.environ.get("PORT", 7860))
@@ -323,7 +326,5 @@ if __name__ == "__main__":
323
  else:
324
  print("All required packages are installed and ready for transparent PNG export")
325
 
 
326
  demo.launch(server_name="0.0.0.0", server_port=port)
327
- # --- Add this before the if __name__ == "__main__" section ---
328
-
329
- )
 
301
  api_name="/generate_handwriting_wrapper", # 👈 this registers the endpoint
302
  title="Handwriting API Endpoint",
303
  description="Programmatic access for handwriting generation."
304
+ ) # ✅ close this parenthesis BEFORE the main block
305
+
306
+
307
  if __name__ == "__main__":
308
  # Set port based on environment variable or default to 7860
309
  port = int(os.environ.get("PORT", 7860))
 
326
  else:
327
  print("All required packages are installed and ready for transparent PNG export")
328
 
329
+ # Launch the UI normally
330
  demo.launch(server_name="0.0.0.0", server_port=port)