Spaces:
Runtime error
Runtime error
ayaanzaveri
commited on
Commit
•
da90409
1
Parent(s):
75abaa8
Update main.py
Browse files
main.py
CHANGED
@@ -4,8 +4,18 @@ from video import download_convert_video_to_audio
|
|
4 |
import yt_dlp
|
5 |
import uuid
|
6 |
import os
|
|
|
7 |
|
8 |
app = FastAPI()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
model_size = "tiny"
|
10 |
|
11 |
# or run on GPU with INT8
|
|
|
4 |
import yt_dlp
|
5 |
import uuid
|
6 |
import os
|
7 |
+
from fastapi.middleware.cors import CORSMiddleware
|
8 |
|
9 |
app = FastAPI()
|
10 |
+
|
11 |
+
app.add_middleware(
|
12 |
+
CORSMiddleware,
|
13 |
+
allow_origins=["*"],
|
14 |
+
allow_credentials=True,
|
15 |
+
allow_methods=["*"],
|
16 |
+
allow_headers=["*"],
|
17 |
+
)
|
18 |
+
|
19 |
model_size = "tiny"
|
20 |
|
21 |
# or run on GPU with INT8
|