Spaces:
Running
Running
Update gui.py
Browse files
gui.py
CHANGED
|
@@ -601,4 +601,19 @@ def create_interface():
|
|
| 601 |
outputs=[ensemble_output, ensemble_status]
|
| 602 |
)
|
| 603 |
|
| 604 |
-
return app
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 601 |
outputs=[ensemble_output, ensemble_status]
|
| 602 |
)
|
| 603 |
|
| 604 |
+
return app
|
| 605 |
+
|
| 606 |
+
if __name__ == "__main__":
|
| 607 |
+
parser = argparse.ArgumentParser(description="Music Source Separation Web UI")
|
| 608 |
+
parser.add_argument("--port", type=int, default=7860, help="Port to run the UI on")
|
| 609 |
+
args = parser.parse_args()
|
| 610 |
+
|
| 611 |
+
app = create_interface()
|
| 612 |
+
try:
|
| 613 |
+
# For Hugging Face Spaces
|
| 614 |
+
app.launch(server_name="0.0.0.0", server_port=args.port, share=False)
|
| 615 |
+
except Exception as e:
|
| 616 |
+
logger.error(f"Failed to launch app: {e}")
|
| 617 |
+
raise
|
| 618 |
+
finally:
|
| 619 |
+
app.close()
|