🧠Phi-2 Humanizer (LoRA Fine-Tuned)
This model is a fine-tuned version of microsoft/phi-2 on a dataset of 50+ examples. It specializes in making stiff or robotic AI-generated writing sound more natural, emotional, and conversational — while avoiding em/en dashes and overly formal phrasing.
✨ Demo
import gradio as gr
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model = AutoModelForCausalLM.from_pretrained("judesv/phi2-svHUCustxt")
tokenizer = AutoTokenizer.from_pretrained("judesv/phi2-svHUCustxt")
def humanize(prompt):
full_prompt = (
f"Instruct: Humanize the following AI-generated text.\n"
f"Input: {prompt}\n"
f"Output:"
)
inputs = tokenizer(full_prompt, return_tensors="pt").to(model.device)
outputs = model.generate(
**inputs,
max_new_tokens=100,
do_sample=True,
top_p=0.9,
temperature=0.7,
eos_token_id=tokenizer.eos_token_id
)
result = tokenizer.decode(outputs[0], skip_special_tokens=True)
return result[len(full_prompt):].strip()
gr.Interface(fn=humanize, inputs="text", outputs="text", title="🧠Phi-2 Humanizer").launch()