Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/pipelines.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,9 +261,12 @@ export class QuestionAnsweringPipeline extends Pipeline {
topk = 1
} = {}) {

// Run tokenization
let inputs = this.tokenizer(question, {
text_pair: context
})
text_pair: context,
padding: true,
truncation: true
});

let output = await this.model(inputs);

Expand Down Expand Up @@ -623,6 +626,8 @@ export class ZeroShotClassificationPipeline extends Pipeline {
for (let hypothesis of hypotheses) {
let inputs = this.tokenizer(premise, {
text_pair: hypothesis,
padding: true,
truncation: true,
})
let outputs = await this.model(inputs)

Expand Down