Skip to content

Commit

Permalink
fix #434
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgatis committed Apr 27, 2023
1 parent e47b2a0 commit f2353d0
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions rembg/commands/s_command.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import json
from typing import Annotated, Optional, Tuple, cast
from typing import Optional, Tuple, cast

import aiohttp
import click
Expand Down Expand Up @@ -83,10 +83,10 @@ def s_command(port: int, log_level: str, threads: int) -> None:
class CommonQueryParams:
def __init__(
self,
model: Annotated[
str, Query(regex=r"(" + "|".join(sessions_names) + ")")
] = Query(
model: str = Query(
description="Model to use when processing image",
regex=r"(" + "|".join(sessions_names) + ")",
default="u2net",
),
a: bool = Query(default=False, description="Enable Alpha Matting"),
af: int = Query(
Expand Down Expand Up @@ -128,10 +128,10 @@ def __init__(
class CommonQueryPostParams:
def __init__(
self,
model: Annotated[
str, Form(regex=r"(" + "|".join(sessions_names) + ")")
] = Form(
model: str = Form(
description="Model to use when processing image",
regex=r"(" + "|".join(sessions_names) + ")",
default="u2net",
),
a: bool = Form(default=False, description="Enable Alpha Matting"),
af: int = Form(
Expand Down

0 comments on commit f2353d0

Please sign in to comment.