Spaces:
Running
on
Zero
Running
on
Zero
Upload app.py
Browse files
app.py
CHANGED
|
@@ -2066,7 +2066,10 @@ with gr.Blocks(theme=args.theme, elem_id="main", fill_width=True, fill_height=Fa
|
|
| 2066 |
|
| 2067 |
def _bind_api_args(*args: Any, **kwargs: Any) -> Dict[str, Any]:
|
| 2068 |
bound = _API_SIG.bind_partial(*args, **kwargs)
|
| 2069 |
-
|
|
|
|
|
|
|
|
|
|
| 2070 |
return bound.arguments
|
| 2071 |
|
| 2072 |
# 3) Signature-clone decorator: keep one signature across both endpoints
|
|
|
|
| 2066 |
|
| 2067 |
def _bind_api_args(*args: Any, **kwargs: Any) -> Dict[str, Any]:
|
| 2068 |
bound = _API_SIG.bind_partial(*args, **kwargs)
|
| 2069 |
+
for name, param in _API_SIG.parameters.items():
|
| 2070 |
+
if name not in bound.arguments or bound.arguments[name] is None:
|
| 2071 |
+
if param.default is not inspect._empty:
|
| 2072 |
+
bound.arguments[name] = param.default
|
| 2073 |
return bound.arguments
|
| 2074 |
|
| 2075 |
# 3) Signature-clone decorator: keep one signature across both endpoints
|