1MR commited on
Commit
913a039
·
verified ·
1 Parent(s): 43344fa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -8,19 +8,19 @@ import sounddevice as sd
8
  from scipy.io.wavfile import write
9
  import tempfile
10
  import os
11
- import uvicorn
12
 
13
  # Initialize FastAPI app
14
  app = FastAPI()
15
 
16
  # CORS configuration
17
- app.add_middleware(
18
- CORSMiddleware,
19
- allow_origins=["*"], # Allow all origins for development; adjust for production
20
- allow_credentials=True,
21
- allow_methods=["*"], # Allow all HTTP methods
22
- allow_headers=["*"], # Allow all headers
23
- )
24
 
25
  # Initialize TTS engine for speaking the translated text
26
  engine = pyttsx3.init()
 
8
  from scipy.io.wavfile import write
9
  import tempfile
10
  import os
11
+ # import uvicorn
12
 
13
  # Initialize FastAPI app
14
  app = FastAPI()
15
 
16
  # CORS configuration
17
+ # app.add_middleware(
18
+ # CORSMiddleware,
19
+ # allow_origins=["*"], # Allow all origins for development; adjust for production
20
+ # allow_credentials=True,
21
+ # allow_methods=["*"], # Allow all HTTP methods
22
+ # allow_headers=["*"], # Allow all headers
23
+ # )
24
 
25
  # Initialize TTS engine for speaking the translated text
26
  engine = pyttsx3.init()