panditamey commited on
Commit
3ca2f4a
1 Parent(s): 6f47b98

Update api.py

Browse files
Files changed (1) hide show
  1. api.py +8 -0
api.py CHANGED
@@ -19,6 +19,14 @@ app = FastAPI(
19
  description='API for Flower Classification',
20
  )
21
 
 
 
 
 
 
 
 
 
22
  id = "1ry4L9L1-kyc79F1MnYMemJ5P81Gr_mHP"
23
  output = "model_flowers_classification.h5"
24
  gdown.download(id=id, output=output, quiet=False)
 
19
  description='API for Flower Classification',
20
  )
21
 
22
+ app.add_middleware(
23
+ CORSMiddleware,
24
+ allow_origins=origins,
25
+ allow_credentials=True,
26
+ allow_methods=["*"],
27
+ allow_headers=["*"],
28
+ )
29
+
30
  id = "1ry4L9L1-kyc79F1MnYMemJ5P81Gr_mHP"
31
  output = "model_flowers_classification.h5"
32
  gdown.download(id=id, output=output, quiet=False)