LogicGoInfotechSpaces commited on
Commit
7c9bfc8
·
verified ·
1 Parent(s): cb34d78

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -1047,7 +1047,8 @@ async def submit(
1047
  files: List[UploadFile] = File(..., description="One or more image files"),
1048
  face_model: Optional[str] = Form(DEFAULT_FACE_MODEL),
1049
  upscale_model: Optional[str] = Form(DEFAULT_UPSCALE_MODEL),
1050
- scale: float = Form(DEFAULT_SCALE),
 
1051
  face_detection: str = Form(DEFAULT_FACE_DET),
1052
  face_detection_threshold: float = Form(DEFAULT_FACE_DET_THRESHOLD),
1053
  face_detection_only_center: bool = Form(DEFAULT_ONLY_CENTER),
@@ -1058,6 +1059,7 @@ async def submit(
1058
  # ---------------------------
1059
  _: bool = Depends(_verify_bearer_token)
1060
  ):
 
1061
  start_time = datetime.utcnow()
1062
  saved_paths = []
1063
  try:
@@ -1094,7 +1096,8 @@ async def submit(
1094
  gallery=gallery,
1095
  face_restoration=face_model if face_model != "None" else None,
1096
  upscale_model=upscale_model if upscale_model != "None" else None,
1097
- scale=float(scale),
 
1098
  face_detection=face_detection,
1099
  face_detection_threshold=face_detection_threshold,
1100
  face_detection_only_center=face_detection_only_center,
 
1047
  files: List[UploadFile] = File(..., description="One or more image files"),
1048
  face_model: Optional[str] = Form(DEFAULT_FACE_MODEL),
1049
  upscale_model: Optional[str] = Form(DEFAULT_UPSCALE_MODEL),
1050
+ # scale: float = Form(DEFAULT_SCALE),
1051
+ scale: int = Form(int(DEFAULT_SCALE)),
1052
  face_detection: str = Form(DEFAULT_FACE_DET),
1053
  face_detection_threshold: float = Form(DEFAULT_FACE_DET_THRESHOLD),
1054
  face_detection_only_center: bool = Form(DEFAULT_ONLY_CENTER),
 
1059
  # ---------------------------
1060
  _: bool = Depends(_verify_bearer_token)
1061
  ):
1062
+
1063
  start_time = datetime.utcnow()
1064
  saved_paths = []
1065
  try:
 
1096
  gallery=gallery,
1097
  face_restoration=face_model if face_model != "None" else None,
1098
  upscale_model=upscale_model if upscale_model != "None" else None,
1099
+ # scale=float(scale),
1100
+ scale=int(scale),
1101
  face_detection=face_detection,
1102
  face_detection_threshold=face_detection_threshold,
1103
  face_detection_only_center=face_detection_only_center,