Skip to content

Commit 8bd9f29

Browse files
committed
edit
1 parent b4e7615 commit 8bd9f29

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed
-3 Bytes
Binary file not shown.

Backend/texttoAIvideo.py

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

4-
router = APIRouter()
4+
app = FastAPI()
55

6-
@router.get('/api6')
6+
@app.get('/api6')
77
async def get_text_from_file():
8-
98
with open('input.txt', 'r') as file:
109
file_text = file.read(200)
11-
return file_text
10+
return file_text
1211

1312
# Configure CORS
1413
origins = [
1514
"http://localhost:3000", # Replace with your frontend URL
1615
# Add more allowed origins if needed
1716
]
1817

19-
router.add_middleware(
18+
app.add_middleware(
2019
CORSMiddleware,
2120
allow_origins=origins,
2221
allow_credentials=True,

__pycache__/main.cpython-310.pyc

7 Bytes
Binary file not shown.

main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#from Backend.summariser import router_summariser as summariser
66
from Backend.Notes_Analyser import router as api4_router
77
#from Backend.speech_text import router as api5_router
8-
from Backend.texttoAIvideo import router as api6_router
8+
from Backend.texttoAIvideo import app as api6_router
99
# import other API routers as needed
1010

1111
app = FastAPI()

0 commit comments

Comments
 (0)