Skip to content

Commit

Permalink
Update classification example (#186)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattjohnsonpint authored Sep 18, 2024
1 parent fdac49f commit 2d066e8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
6 changes: 1 addition & 5 deletions examples/classification/assembly/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,7 @@ function getLabels(prediction: ClassifierResult): Map<string, f32> {
return labels;
}

// This function is similar to the previous, but allows multiple items to be
// classified at a time. Note that it might be nicer to have passed in a
// Map<string, string> instead of two arrays. However, that is not yet
// supported in Hypermode. This example may be updated in the future when
// that is supported.
// This function is similar to the previous, but allows multiple items to be classified at a time.
export function getMultipleClassificationLabels(
ids: string[],
texts: string[],
Expand Down
15 changes: 0 additions & 15 deletions examples/classification/hypermode.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,6 @@
"sourceModel": "distilbert/distilbert-base-uncased",
"host": "hypermode",
"provider": "hugging-face"
},
// This defines a custom model that is hosted on AWS, at the host specified below.
"my-custom-classifier": {
"sourceModel": "distilbert-base-uncased",
"host": "aws-classifier"
}
},
"hosts": {
// This defines a host that is used by the custom model above.
// The {{API_KEY}} will be replaced by the secret provided in the Hypermode Console.
"aws-classifier": {
"endpoint": "https://nerpndlnl6.execute-api.us-east-1.amazonaws.com/dev/classifier",
"headers": {
"X-API-Key": "{{API_KEY}}"
}
}
}
}

0 comments on commit 2d066e8

Please sign in to comment.