Skip to content

Commit c489845

Browse files
committed
basic
1 parent 1925c61 commit c489845

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

packages/inference/src/snippets/templates/python/huggingface_hub/basic.jinja

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
result = client.{{ methodName }}(
2-
inputs={{ inputs }},
2+
inputs={{ inputs.asObj.inputs }},
33
model="{{ model.id }}",
44
)
55

packages/inference/src/snippets/templates/python/requests/basic.jinja

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ def query(payload):
33
return response.json()
44

55
output = query({
6-
"inputs": {{ inputs }},
6+
"inputs": {{ inputs.asObj.inputs }},
77
})

packages/inference/src/snippets/templates/python/requests/basicFile.jinja

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ def query(filename):
44
response = requests.post(API_URL, headers=headers, data=data)
55
return response.json()
66

7-
output = query({{ inputs }})
7+
output = query({{ inputs.asObj.inputs }})

packages/tasks-gen/scripts/generate-snippets-fixtures.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -156,17 +156,17 @@ const TEST_CASES: {
156156
providers: ["replicate", "fal-ai"],
157157
languages: ["js", "py"],
158158
},
159-
// {
160-
// testName: "text-classification",
161-
// model: {
162-
// id: "distilbert/distilbert-base-uncased-finetuned-sst-2-english",
163-
// pipeline_tag: "text-classification",
164-
// tags: [],
165-
// inference: "",
166-
// },
167-
// providers: ["hf-inference"],
168-
// languages: ["sh", "js", "py"],
169-
// },
159+
{
160+
testName: "text-classification",
161+
model: {
162+
id: "distilbert/distilbert-base-uncased-finetuned-sst-2-english",
163+
pipeline_tag: "text-classification",
164+
tags: [],
165+
inference: "",
166+
},
167+
providers: ["hf-inference"],
168+
languages: ["sh", "js", "py"],
169+
},
170170
// {
171171
// testName: "basic-snippet--token-classification",
172172
// model: {

0 commit comments

Comments
 (0)