ariansyahdedy commited on
Commit
4e7dde3
·
1 Parent(s): a5fc24c

delete docker

Browse files
.env ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ HOST=127.0.0.1
2
+ PORT=3000
Dockerfile → DumpDockerfile RENAMED
File without changes
__pycache__/main.cpython-310.pyc ADDED
Binary file (1.02 kB). View file
 
app/routers/__pycache__/video.cpython-310.pyc CHANGED
Binary files a/app/routers/__pycache__/video.cpython-310.pyc and b/app/routers/__pycache__/video.cpython-310.pyc differ
 
app/main.py → main.py RENAMED
@@ -1,23 +1,34 @@
1
- from fastapi import FastAPI, Depends, HTTPException, status, File, UploadFile
2
- from fastapi.security import OAuth2PasswordBearer, OAuth2PasswordRequestForm
3
- from fastapi.middleware.cors import CORSMiddleware
4
-
5
- from typing import List
6
- from .routers import video
7
- from typing import Annotated
8
- # from transparent_background import Remover
9
-
10
-
11
- from datetime import timedelta
12
-
13
- app = FastAPI()
14
- app.add_middleware(
15
- CORSMiddleware,
16
- allow_origins=["*"],
17
- allow_credentials=True,
18
- allow_methods=["*"],
19
- allow_headers=["*"],
20
- )
21
-
22
-
23
- app.include_router(video.router)
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from fastapi import FastAPI, Depends, HTTPException, status, File, UploadFile
2
+ from fastapi.security import OAuth2PasswordBearer, OAuth2PasswordRequestForm
3
+ from fastapi.middleware.cors import CORSMiddleware
4
+
5
+ from typing import List
6
+ from app.routers import video
7
+ from typing import Annotated
8
+ # from transparent_background import Remover
9
+ import uvicorn,os
10
+
11
+ from datetime import timedelta
12
+ from dotenv import load_dotenv
13
+
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
+
23
+ app.add_middleware(
24
+ CORSMiddleware,
25
+ allow_origins=["*"],
26
+ allow_credentials=True,
27
+ allow_methods=["*"],
28
+ allow_headers=["*"],
29
+ )
30
+
31
+ app.include_router(video.router)
32
+
33
+ if __name__ == "__main__":
34
+ uvicorn.run("main:app", host=host, port=port, reload=True)