Spaces:
Running
Running
Update modules/app.py
Browse files- modules/app.py +5 -7
modules/app.py
CHANGED
@@ -22,13 +22,11 @@ app = FastAPI()
|
|
22 |
origins = ["*"]
|
23 |
|
24 |
app.add_middleware(
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
allow_headers=["*"],
|
31 |
-
)
|
32 |
)
|
33 |
|
34 |
fasttext.FastText.eprint = lambda x: None
|
|
|
22 |
origins = ["*"]
|
23 |
|
24 |
app.add_middleware(
|
25 |
+
CORSMiddleware,
|
26 |
+
allow_origins=origins,
|
27 |
+
allow_credentials=False,
|
28 |
+
allow_methods=["*"],
|
29 |
+
allow_headers=["*"],
|
|
|
|
|
30 |
)
|
31 |
|
32 |
fasttext.FastText.eprint = lambda x: None
|