@@ -7,8 +7,7 @@ export const snippetBasic = (model: ModelDataMinimal, accessToken: string): stri
7
7
-X POST \\
8
8
-d '{"inputs": ${ getModelInputSnippet ( model , true ) } }' \\
9
9
-H 'Content-Type: application/json' \\
10
- -H "Authorization: Bearer ${ accessToken || `{API_TOKEN}` } "
11
- ` ;
10
+ -H "Authorization: Bearer ${ accessToken || `{API_TOKEN}` } "` ;
12
11
13
12
export const snippetTextGeneration = ( model : ModelDataMinimal , accessToken : string ) : string => {
14
13
if ( model . config ?. tokenizer_config ?. chat_template ) {
@@ -33,15 +32,13 @@ export const snippetZeroShotClassification = (model: ModelDataMinimal, accessTok
33
32
-X POST \\
34
33
-d '{"inputs": ${ getModelInputSnippet ( model , true ) } , "parameters": {"candidate_labels": ["refund", "legal", "faq"]}}' \\
35
34
-H 'Content-Type: application/json' \\
36
- -H "Authorization: Bearer ${ accessToken || `{API_TOKEN}` } "
37
- ` ;
35
+ -H "Authorization: Bearer ${ accessToken || `{API_TOKEN}` } "` ;
38
36
39
37
export const snippetFile = ( model : ModelDataMinimal , accessToken : string ) : string =>
40
38
`curl https://api-inference.huggingface.co/models/${ model . id } \\
41
39
-X POST \\
42
40
--data-binary '@${ getModelInputSnippet ( model , true , true ) } ' \\
43
- -H "Authorization: Bearer ${ accessToken || `{API_TOKEN}` } "
44
- ` ;
41
+ -H "Authorization: Bearer ${ accessToken || `{API_TOKEN}` } "` ;
45
42
46
43
export const curlSnippets : Partial < Record < PipelineType , ( model : ModelDataMinimal , accessToken : string ) => string > > = {
47
44
// Same order as in js/src/lib/interfaces/Types.ts
0 commit comments