Added run.py to execute in HF space
This commit is contained in:
15
run.py
Normal file
15
run.py
Normal file
@@ -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)
|
||||
Reference in New Issue
Block a user