Spaces:
Sleeping
Sleeping
Even on error have return two output to compatible with two gradio components
Browse files
app.py
CHANGED
|
@@ -116,7 +116,7 @@ class SimilarityModel:
|
|
| 116 |
try:
|
| 117 |
assert isinstance(tools_data, list) and all(isinstance(d, dict) for d in tools_data)
|
| 118 |
except AssertionError:
|
| 119 |
-
return tools_data
|
| 120 |
|
| 121 |
# Create a unique key for caching based on the tools data
|
| 122 |
tools_cache_key = json.dumps(tools_data, sort_keys=True)
|
|
|
|
| 116 |
try:
|
| 117 |
assert isinstance(tools_data, list) and all(isinstance(d, dict) for d in tools_data)
|
| 118 |
except AssertionError:
|
| 119 |
+
return tools_data, [{"Error": tools_data}]
|
| 120 |
|
| 121 |
# Create a unique key for caching based on the tools data
|
| 122 |
tools_cache_key = json.dumps(tools_data, sort_keys=True)
|