Spaces:
Sleeping
Sleeping
Commit
·
c9d1ed3
1
Parent(s):
52d66d5
switched to fastapi
Browse files
main.py
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
|
2 |
-
from
|
3 |
from fastapi.middleware.cors import CORSMiddleware
|
4 |
from generator import generation_function
|
5 |
from pydantic import BaseModel
|
6 |
|
7 |
|
8 |
-
app =
|
9 |
app.add_middleware(
|
10 |
CORSMiddleware,
|
11 |
allow_origins=['*'],
|
|
|
1 |
|
2 |
+
from fastapi import FastAPI
|
3 |
from fastapi.middleware.cors import CORSMiddleware
|
4 |
from generator import generation_function
|
5 |
from pydantic import BaseModel
|
6 |
|
7 |
|
8 |
+
app = FastAPI()
|
9 |
app.add_middleware(
|
10 |
CORSMiddleware,
|
11 |
allow_origins=['*'],
|