ayaanzaveri commited on
Commit
da90409
1 Parent(s): 75abaa8

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +10 -0
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