frissonlabs's picture
Upload folder using huggingface_hub
36a4452 verified
---
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.
```