Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -301,7 +301,13 @@ def update_code_and_docs(select):
|
|
301 |
|
302 |
def update_code_and_docs_on_start(url_params: gr.Request):
|
303 |
params = get_params(url_params)
|
304 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
305 |
return gr.update(value=transform_name)
|
306 |
|
307 |
with gr.Blocks() as demo:
|
|
|
301 |
|
302 |
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 |
+
gt.Warning(f"Sorry, `{params.transform_name}` transform is not supported at the moment :(")
|
306 |
+
transform_name = DEFAULT_TRANSFORM
|
307 |
+
elif params.transform_name in transforms_map:
|
308 |
+
transform_name = params.transform_name
|
309 |
+
else:
|
310 |
+
transform_name = DEFAULT_TRANSFORM
|
311 |
return gr.update(value=transform_name)
|
312 |
|
313 |
with gr.Blocks() as demo:
|