Skip to content

Commit 3d4b14f

Browse files
committed
edit 2
1 parent 8bd9f29 commit 3d4b14f

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed
64 Bytes
Binary file not shown.

Backend/texttoAIvideo.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
from fastapi import FastAPI
1+
from fastapi import FastAPI, APIRouter
22
from fastapi.middleware.cors import CORSMiddleware
33

44
app = FastAPI()
5+
router = APIRouter()
56

6-
@app.get('/api6')
7+
@router.get('/api6')
78
async def get_text_from_file():
89
with open('input.txt', 'r') as file:
910
file_text = file.read(200)
@@ -15,6 +16,8 @@ async def get_text_from_file():
1516
# Add more allowed origins if needed
1617
]
1718

19+
app.include_router(router)
20+
1821
app.add_middleware(
1922
CORSMiddleware,
2023
allow_origins=origins,

0 commit comments

Comments
 (0)