Malaji71 commited on
Commit
64035d8
·
verified ·
1 Parent(s): 308cd44

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -13
app.py CHANGED
@@ -343,22 +343,20 @@ def main():
343
  # Create and launch interface
344
  demo = create_interface()
345
 
346
- # Launch configuration - Compatible with ZeroGPU
347
- launch_config = {
348
- "server_name": "0.0.0.0",
349
- "server_port": 7860,
350
- "show_error": True,
351
- "enable_queue": True
352
- }
353
-
354
- # Add share option for Spaces
355
  if ENVIRONMENT["is_spaces"]:
356
- launch_config["share"] = False # Spaces handles sharing
 
357
  else:
358
- launch_config["share"] = True # Enable sharing for local
 
 
 
 
 
 
359
 
360
- logger.info(f"Launching on port {launch_config['server_port']}")
361
- demo.launch(**launch_config)
362
 
363
 
364
  if __name__ == "__main__":
 
343
  # Create and launch interface
344
  demo = create_interface()
345
 
346
+ # Minimal launch configuration - ZeroGPU compatible
 
 
 
 
 
 
 
 
347
  if ENVIRONMENT["is_spaces"]:
348
+ # For Hugging Face Spaces/ZeroGPU - minimal config
349
+ demo.launch()
350
  else:
351
+ # For local development - full config
352
+ demo.launch(
353
+ server_name="0.0.0.0",
354
+ server_port=7860,
355
+ share=True,
356
+ show_error=True
357
+ )
358
 
359
+ logger.info("Application launched successfully")
 
360
 
361
 
362
  if __name__ == "__main__":