Rembg is a tool to remove images background
allow all cors
Daniel Gatisf339a11036c0
diff --git a/rembg/cli.py b/rembg/cli.pyindex 6e8c5bc..10f41b1 100644--- a/rembg/cli.py+++ b/rembg/cli.py@@ -10,6 +10,7 @@ import filetypeimport uvicornfrom asyncer import asyncifyfrom fastapi import Depends, FastAPI, File, Query+from fastapi.middleware.cors import CORSMiddlewarefrom starlette.responses import Responsefrom tqdm import tqdmfrom watchdog.events import FileSystemEvent, FileSystemEventHandler@@ -270,6 +271,14 @@ def s(port: int, log_level: str) -> None:openapi_tags=tags_metadata,)+ app.add_middleware(+ CORSMiddleware,+ allow_credentials=True,+ allow_origins=["*"],+ allow_methods=["*"],+ allow_headers=["*"],+ )+class ModelType(str, Enum):u2net = "u2net"u2netp = "u2netp"