Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -343,22 +343,20 @@ def main():
|
|
| 343 |
# Create and launch interface
|
| 344 |
demo = create_interface()
|
| 345 |
|
| 346 |
-
#
|
| 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 |
-
|
|
|
|
| 357 |
else:
|
| 358 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 359 |
|
| 360 |
-
logger.info(
|
| 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__":
|