Spaces:
Runtime error
Runtime error
Update app.js
Browse files
app.js
CHANGED
|
@@ -45,7 +45,7 @@ async function hfTextInference(model, prompt, token) {
|
|
| 45 |
|
| 46 |
if (!res.ok) {
|
| 47 |
const text = await res.text();
|
| 48 |
-
throw new Error(`模型调用失败
|
| 49 |
}
|
| 50 |
|
| 51 |
const data = await res.json();
|
|
|
|
| 45 |
|
| 46 |
if (!res.ok) {
|
| 47 |
const text = await res.text();
|
| 48 |
+
throw new Error(`模型调用失败: ${res.status} ${text}`);
|
| 49 |
}
|
| 50 |
|
| 51 |
const data = await res.json();
|