Spaces:
Runtime error
Runtime error
| export interface ModelConfig { | |
| inputComponent: React.ComponentType<any>; | |
| outputComponent: React.ComponentType<any>; | |
| defaultModel: string; | |
| } | |
| import { TextInput } from "@/app/components/TextInput"; | |
| import { ImageInput } from "@/app/components/ImageInput"; | |
| import { ClassificationResultDisplay } from "@/app/components/ClassificationResultDisplay"; | |
| import { AudioInput } from "@/app/components/AudioInput"; | |
| import { ASRResultDisplay } from "@/app/components/ASRResultDisplay"; | |
| export const modelConfigMap: Record<string, ModelConfig> = { | |
| "text-classification": { | |
| inputComponent: TextInput, | |
| outputComponent: ClassificationResultDisplay, | |
| defaultModel: "onnx-community/rubert-tiny-sentiment-balanced-ONNX" | |
| }, | |
| "image-classification": { | |
| inputComponent: ImageInput, | |
| outputComponent: ClassificationResultDisplay, | |
| defaultModel: "onnx-community/vit-tiny-patch16-224-ONNX" | |
| }, | |
| "automatic-speech-recognition": { | |
| inputComponent: AudioInput, | |
| outputComponent: ASRResultDisplay, | |
| defaultModel: "onnx-community/moonshine-tiny-ONNX" | |
| } | |
| }; |