SarahXia0405 commited on
Commit
aca932f
·
verified ·
1 Parent(s): 9ce7369

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -273,8 +273,9 @@ def get_embedding(text: str) -> Optional[List[float]]:
273
  input=[text],
274
  )
275
  return resp.data[0].embedding
276
- except Exception:
277
- # 如果 embedding 调用失败,就返回 None,不阻塞主流程
 
278
  return None
279
 
280
 
 
273
  input=[text],
274
  )
275
  return resp.data[0].embedding
276
+ except Exception as e:
277
+ # 打到 Hugging Face 的 log,方便你在 Space Logs 里看
278
+ print(f"[Embedding error] {repr(e)}")
279
  return None
280
 
281