(modelId: string = BROWSER_MODEL.id)
| 86 | ]; |
| 87 | |
| 88 | export function getBrowserModel(modelId: string = BROWSER_MODEL.id): BrowserModel { |
| 89 | const model = BROWSER_MODELS.find(candidate => candidate.id === modelId); |
| 90 | if (!model) throw new Error('Unknown browser model. Choose a model from the catalog.'); |
| 91 | return model; |
| 92 | } |
| 93 | |
| 94 | export function browserModelBaseUrl(model: BrowserModel): string { |
| 95 | return `https://huggingface.co/${model.id}/resolve/${model.revision}/`; |
no outgoing calls
no test coverage detected