Skip to content

Commit ccd9e84

Browse files
committed
fix: text classification
1 parent bef12ff commit ccd9e84

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

extensions/firestore-huggingface-inference-api/functions/src/run_inference.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,13 @@ export async function runHostedInference(
152152
model: config.modelId,
153153
}),
154154
inputs: inputs,
155+
parameters: {
156+
return_all_scores: true,
157+
top_k: null,
158+
},
155159
};
156160

157-
return await inference.textClassification(options);
161+
return await inference.request<TextClassificationOutput>(options);
158162
}
159163

160164
case Task.textGeneration:

0 commit comments

Comments
 (0)