@@ -46,34 +46,34 @@ export async function runInference(
46
46
) : Promise < InferenceOutput > {
47
47
switch ( task ) {
48
48
case TaskId . fillMask : {
49
- return await tasks . fillMask ( snapshot , inference ) ;
49
+ return tasks . fillMask ( snapshot , inference ) ;
50
50
}
51
51
52
52
case TaskId . summarization : {
53
- return await tasks . summarization ( snapshot , inference ) ;
53
+ return tasks . summarization ( snapshot , inference ) ;
54
54
}
55
55
56
56
case TaskId . questionAnswering : {
57
- return await tasks . questionAnswering ( snapshot , inference ) ;
57
+ return tasks . questionAnswering ( snapshot , inference ) ;
58
58
}
59
59
60
60
case TaskId . tableQuestionAnswering : {
61
- return await tasks . tableQuestionAnswering ( snapshot , inference ) ;
61
+ return tasks . tableQuestionAnswering ( snapshot , inference ) ;
62
62
}
63
63
64
64
case TaskId . sentenceSimilarity : {
65
- return await tasks . sentenceSimilarity ( snapshot , inference ) ;
65
+ return tasks . sentenceSimilarity ( snapshot , inference ) ;
66
66
}
67
67
68
68
case TaskId . textClassification : {
69
- return await tasks . textClassification ( snapshot , inference ) ;
69
+ return tasks . textClassification ( snapshot , inference ) ;
70
70
}
71
71
72
72
// Text generation and text2text are currently the same.
73
73
// See https://huggingface.co/docs/api-inference/detailed_parameters#text2text-generation-task
74
74
case TaskId . textGeneration :
75
75
case TaskId . text2textGeneration : {
76
- return await tasks . textGeneration ( snapshot , inference ) ;
76
+ return tasks . textGeneration ( snapshot , inference ) ;
77
77
}
78
78
79
79
// Token Classification and Named Entity Recognition are currently the same.
@@ -84,17 +84,17 @@ export async function runInference(
84
84
}
85
85
86
86
case TaskId . translation : {
87
- return await tasks . translation ( snapshot , inference ) ;
87
+ return tasks . translation ( snapshot , inference ) ;
88
88
}
89
89
90
90
case TaskId . zeroShotClassification : {
91
- return await tasks . zeroShotClassification ( snapshot , inference ) ;
91
+ return tasks . zeroShotClassification ( snapshot , inference ) ;
92
92
}
93
93
case TaskId . conversational : {
94
- return await tasks . conversational ( snapshot , inference ) ;
94
+ return tasks . conversational ( snapshot , inference ) ;
95
95
}
96
96
case TaskId . featureExtraction : {
97
- return await tasks . featureExtraction ( snapshot , inference ) ;
97
+ return tasks . featureExtraction ( snapshot , inference ) ;
98
98
}
99
99
}
100
100
}
0 commit comments