Views
No views yet
phi2_emotrack_finetuned)phi-2 language model for classifying emotional tone and detecting sarcasm in text messages. This model is part of the EmotiTrack project, designed for use in emotional journaling, mental health tech, and empathetic AI assistants.microsoft/phi-2)microsoft/phi-2 using PEFT (LoRA)deepset/sarcasm-xlm-roberta-base) in short-form user text.1from transformers import pipeline
2
3pipe = pipeline(
4 "text-generation",
5 model="dmuturia/phi2_emotrack_finetuned",
6 tokenizer="dmuturia/phi2_emotrack_finetuned",
7 device=0 # Use -1 for CPU
8)
9
10prompt = """### Instruction:
11Classify the emotional tone and detect sarcasm in the following message.
12
13### Input:
14"I just love it when everything breaks right before a deadline."
15
16### Response:
17"""
18
19output = pipe(prompt, max_new_tokens=60)[0]["generated_text"]
20print(output)