Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
#
|
|
|
|
| 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 |
|