Spaces:
Sleeping
Sleeping
Commit
·
a1cc9cf
1
Parent(s):
1261102
fix docker
Browse files- app/main.py +4 -3
app/main.py
CHANGED
|
@@ -14,9 +14,10 @@ from dotenv import load_dotenv
|
|
| 14 |
# Load environment variables from .env file
|
| 15 |
load_dotenv()
|
| 16 |
|
|
|
|
| 17 |
# Read environment variables
|
| 18 |
-
host = os.getenv("HOST")
|
| 19 |
-
port = int(os.getenv("PORT"))
|
| 20 |
print(host,port)
|
| 21 |
app = FastAPI()
|
| 22 |
|
|
@@ -35,4 +36,4 @@ async def root():
|
|
| 35 |
return {"greeting": "Hello, World!", "message": "This is a service to extract the first frame of a video!"}
|
| 36 |
|
| 37 |
if __name__ == "__main__":
|
| 38 |
-
uvicorn.run("app.main:app", host
|
|
|
|
| 14 |
# Load environment variables from .env file
|
| 15 |
load_dotenv()
|
| 16 |
|
| 17 |
+
|
| 18 |
# Read environment variables
|
| 19 |
+
host = os.getenv("HOST", "0.0.0.0")
|
| 20 |
+
port = int(os.getenv("PORT", 8000))
|
| 21 |
print(host,port)
|
| 22 |
app = FastAPI()
|
| 23 |
|
|
|
|
| 36 |
return {"greeting": "Hello, World!", "message": "This is a service to extract the first frame of a video!"}
|
| 37 |
|
| 38 |
if __name__ == "__main__":
|
| 39 |
+
uvicorn.run("app.main:app", host=host, port=port, log_level="info")
|