code updated

This commit is contained in:
superobk
2024-04-09 12:00:08 +08:00
parent 41621b44f7
commit c104ea52b5
3 changed files with 12 additions and 2 deletions

10
main.py
View File

@ -8,9 +8,19 @@ from src.dotchain.runtime.tokenizer import Tokenizer
from src.dotchain.runtime.runtime import Runtime
from src.blackbox.blackbox_factory import BlackboxFactory
import uvicorn
from fastapi.middleware.cors import CORSMiddleware
app = FastAPI()
app.add_middleware(
CORSMiddleware,
allow_origins=["*"],
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)
blackbox_factory = BlackboxFactory()
@app.post("/")