farukbera commited on
Commit
d094bcb
·
1 Parent(s): be5df3f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -0
app.py CHANGED
@@ -8,6 +8,14 @@ import io
8
 
9
  app = FastAPI()
10
 
 
 
 
 
 
 
 
 
11
  device = "cuda"
12
  # , torch_dtype=torch.float16
13
  device1 = "cpu"
 
8
 
9
  app = FastAPI()
10
 
11
+ app.add_middleware(
12
+ CORSMiddleware,
13
+ allow_origins=["*"],
14
+ allow_methods=["*"],
15
+ allow_headers=["*"],
16
+ allow_credentials=True,
17
+ )
18
+
19
  device = "cuda"
20
  # , torch_dtype=torch.float16
21
  device1 = "cpu"