Skip to content

Commit cd8317b

Browse files
committed
3
1 parent bc03682 commit cd8317b

File tree

4 files changed

+5
-13
lines changed

4 files changed

+5
-13
lines changed
-104 Bytes
Binary file not shown.

Backend/texttoAIvideo.py

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,19 @@
1-
from fastapi import FastAPI, APIRouter
1+
from fastapi import FastAPI
22
from fastapi.middleware.cors import CORSMiddleware
33

44
app = FastAPI()
5-
router = APIRouter()
65

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

1312
# Configure CORS
14-
origins = [
15-
"http://localhost:3000", # Replace with your frontend URL
16-
# Add more allowed origins if needed
17-
]
18-
19-
app.include_router(router)
20-
2113
app.add_middleware(
2214
CORSMiddleware,
23-
allow_origins=origins,
15+
allow_origins=["http://localhost:3000"], # Replace with your frontend URL
2416
allow_credentials=True,
25-
allow_methods=["GET", "POST", "PUT", "DELETE"],
17+
allow_methods=["GET"],
2618
allow_headers=["*"],
2719
)

__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)