Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -36,6 +36,7 @@ HEADER = f"""
|
|
| 36 |
"""
|
| 37 |
|
| 38 |
DEFAULT_TRANSFORM = "Rotate"
|
|
|
|
| 39 |
|
| 40 |
DEFAULT_IMAGE_PATH = "images/doctor.webp"
|
| 41 |
DEFAULT_IMAGE = np.array(Image.open(DEFAULT_IMAGE_PATH))
|
|
@@ -303,7 +304,7 @@ def update_code_and_docs_on_start(url_params: gr.Request):
|
|
| 303 |
params = get_params(url_params)
|
| 304 |
if params.transform_name is not None and params.transform_name not in transforms_map:
|
| 305 |
gr.Warning(f"Sorry, `{params.transform_name}` transform is not supported at the moment :(")
|
| 306 |
-
transform_name =
|
| 307 |
elif params.transform_name in transforms_map:
|
| 308 |
transform_name = params.transform_name
|
| 309 |
else:
|
|
|
|
| 36 |
"""
|
| 37 |
|
| 38 |
DEFAULT_TRANSFORM = "Rotate"
|
| 39 |
+
NO_OPERATION_TRANFORM = "NoOp"
|
| 40 |
|
| 41 |
DEFAULT_IMAGE_PATH = "images/doctor.webp"
|
| 42 |
DEFAULT_IMAGE = np.array(Image.open(DEFAULT_IMAGE_PATH))
|
|
|
|
| 304 |
params = get_params(url_params)
|
| 305 |
if params.transform_name is not None and params.transform_name not in transforms_map:
|
| 306 |
gr.Warning(f"Sorry, `{params.transform_name}` transform is not supported at the moment :(")
|
| 307 |
+
transform_name = NO_OPERATION_TRANFORM
|
| 308 |
elif params.transform_name in transforms_map:
|
| 309 |
transform_name = params.transform_name
|
| 310 |
else:
|