Hugging Face Deployer commited on
Commit
295c8cb
·
1 Parent(s): 6b7e2cc

Deploy explorer to Hugging Face Spaces

Browse files
Files changed (1) hide show
  1. evals/interactive_explorer.py +6 -0
evals/interactive_explorer.py CHANGED
@@ -1505,6 +1505,12 @@ async def search_indicators(query: str):
1505
  try:
1506
  from data360 import api as data360_api
1507
  res = await data360_api.search(query=query, limit=10)
 
 
 
 
 
 
1508
  indicators = []
1509
  if hasattr(res, "indicators") and res.indicators:
1510
  for ind in res.indicators:
 
1505
  try:
1506
  from data360 import api as data360_api
1507
  res = await data360_api.search(query=query, limit=10)
1508
+
1509
+ if hasattr(res, "error") and res.error:
1510
+ return {"error": res.error}
1511
+ if isinstance(res, dict) and res.get("error"):
1512
+ return {"error": res.get("error")}
1513
+
1514
  indicators = []
1515
  if hasattr(res, "indicators") and res.indicators:
1516
  for ind in res.indicators: