Spaces:
Sleeping
Sleeping
update code
Browse files
app.py
CHANGED
@@ -11,6 +11,14 @@ df = pd.DataFrame(data={"label": pickle.load(open("./corpus/y_all.pickle"))})
|
|
11 |
|
12 |
app = FastAPI()
|
13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
class Disease(BaseModel):
|
15 |
id: int
|
16 |
name: str
|
|
|
11 |
|
12 |
app = FastAPI()
|
13 |
|
14 |
+
app.add_middleware(
|
15 |
+
CORSMiddleware,
|
16 |
+
allow_origins=["*"],
|
17 |
+
allow_credentials=True,
|
18 |
+
allow_methods=["*"],
|
19 |
+
allow_headers=["*"],
|
20 |
+
)
|
21 |
+
|
22 |
class Disease(BaseModel):
|
23 |
id: int
|
24 |
name: str
|