Downloads · 30 days
20
34% of all-time downloads
joseAndres777/WazapSplitter-LLM
WazapSplitter-LLM is a text generation model from joseAndres777. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
Splits text into natural WhatsApp-style message segments.
Downloads · 30 days
20
34% of all-time downloads
All-time downloads
58
Public
Repo size
224 MB
Likes
4
Public
Click a slice to open those files.
.safetensors207 MB · 92%
From the Hugging Face model README
Splits text into natural WhatsApp-style message segments.
Input: "buenos dias queria confirmar la hora de la reunion"
Output: ["buenos días", "quería confirmar la hora de la reunión"]
async function splitMessage(text: string): Promise<string[]> {
const prompt = `Split messages at natural breaks into JSON array. Common patterns: greeting+question, statement+question, topic+followup. Keep original words, only add logical splits.
User: ${text}
Assistant:`;
const response = await fetch("https://api-inference.huggingface.co/models/joseAndres777/WazapSplitter-LLM", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_HF_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
inputs: prompt,
parameters: { max_new_tokens: 100, temperature: 0.3 }
})
});
const data = await response.json();
return JSON.parse(data[0].generated_text);
}
// Example
const segments = await splitMessage("hola como estas que tal todo?");
console.log(segments); // ["hola", "como estas", "que tal todo?"]
// Make responses feel more human
const segments = await splitMessage(botResponse);
for (const segment of segments) {
await sendMessage(segment);
await delay(1000 + Math.random() * 2000); // Human-like timing
}