Instructions to use frissonlabs/script-parser-gemma3-270m-ONNX with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use frissonlabs/script-parser-gemma3-270m-ONNX with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('text-generation', 'frissonlabs/script-parser-gemma3-270m-ONNX');
| library_name: transformers.js | |
| base_model: checkpoints/merged | |
| tags: | |
| - onnx | |
| - transformers.js | |
| - script-parsing | |
| - rehearsay | |
| pipeline_tag: text-generation | |
| # Script Parser 360M (ONNX) | |
| Fine-tuned SmolLM2-360M-Instruct for theatrical script parsing. | |
| Converts raw script text into pipe-delimited `D|CHARACTER|parenthetical|line` and `S|stage direction` format. | |
| ## Usage with transformers.js | |
| ```javascript | |
| import { AutoTokenizer, AutoModelForCausalLM } from "@huggingface/transformers"; | |
| const tokenizer = await AutoTokenizer.from_pretrained("frissonlabs/script-parser-360m-ONNX"); | |
| const model = await AutoModelForCausalLM.from_pretrained("frissonlabs/script-parser-360m-ONNX", { | |
| dtype: "q4f16", | |
| device: "wasm", // or "webgpu" | |
| }); | |
| ``` | |
| ## Input/Output Format | |
| **Input** (raw script text): | |
| ``` | |
| JOHN. (Crossing to the window.) I can't believe you said that. | |
| Mary. I didn't say anything! | |
| (The phone rings.) | |
| ``` | |
| **Output** (pipe-delimited): | |
| ``` | |
| D|JOHN|Crossing to the window.|I can't believe you said that. | |
| D|MARY||I didn't say anything! | |
| S|The phone rings. | |
| ``` | |