Spaces:
Running
on
T4
Running
on
T4
Update app.py
Browse files
app.py
CHANGED
|
@@ -1077,18 +1077,33 @@ async def submit(
|
|
| 1077 |
return None
|
| 1078 |
progress_stub = _NoProgress()
|
| 1079 |
|
| 1080 |
-
output_files, zip_files = _api_upscale.inference(
|
| 1081 |
-
|
| 1082 |
-
|
| 1083 |
-
|
| 1084 |
-
|
| 1085 |
-
|
| 1086 |
-
|
| 1087 |
-
|
| 1088 |
-
|
| 1089 |
-
|
| 1090 |
-
|
| 1091 |
-
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1092 |
# -----------------------------------------------------------------
|
| 1093 |
# NEW: MEDIA CLICK LOGGING (AFTER SUCCESSFUL CORE PROCESSING)
|
| 1094 |
# -----------------------------------------------------------------
|
|
|
|
| 1077 |
return None
|
| 1078 |
progress_stub = _NoProgress()
|
| 1079 |
|
| 1080 |
+
# output_files, zip_files = _api_upscale.inference(
|
| 1081 |
+
# gallery=gallery,
|
| 1082 |
+
# face_restoration=face_model if face_model != "None" else None,
|
| 1083 |
+
# upscale_model=upscale_model if upscale_model != "None" else None,
|
| 1084 |
+
# scale=float(scale),
|
| 1085 |
+
# face_detection=face_detection,
|
| 1086 |
+
# face_detection_threshold=face_detection_threshold,
|
| 1087 |
+
# face_detection_only_center=face_detection_only_center,
|
| 1088 |
+
# outputWithModelName=with_model_name,
|
| 1089 |
+
# save_as_png=True,
|
| 1090 |
+
# progress=progress_stub,
|
| 1091 |
+
# )
|
| 1092 |
+
try:
|
| 1093 |
+
output_files, zip_files = _api_upscale.inference(
|
| 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,
|
| 1101 |
+
outputWithModelName=with_model_name,
|
| 1102 |
+
save_as_png=True,
|
| 1103 |
+
progress=progress_stub,
|
| 1104 |
+
)
|
| 1105 |
+
except Exception as infer_err:
|
| 1106 |
+
raise RuntimeError(f"Inference failed: {infer_err}") # FORCE FAIL
|
| 1107 |
# -----------------------------------------------------------------
|
| 1108 |
# NEW: MEDIA CLICK LOGGING (AFTER SUCCESSFUL CORE PROCESSING)
|
| 1109 |
# -----------------------------------------------------------------
|