From 884ff4228cbc1861ac5cecbd2c52d997216c2c6d Mon Sep 17 00:00:00 2001 From: Stefano Date: Fri, 2 May 2025 19:41:13 -0500 Subject: [PATCH] Added run.py to execute in HF space --- run.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 run.py diff --git a/run.py b/run.py new file mode 100644 index 0000000..3fa094c --- /dev/null +++ b/run.py @@ -0,0 +1,15 @@ +from fastapi import FastAPI +from src.stream_link_server import app as streamlink_server_app + +# Initialize the main FastAPI application +main_app = FastAPI() + +# Manually add only non-static routes from streamlink_server_app +for route in streamlink_server_app.routes: + if route.path != "/": # Exclude the static file path + main_app.router.routes.append(route) + +# Run the main app +if __name__ == "__main__": + import uvicorn + uvicorn.run(main_app, host="0.0.0.0", port=8080)