Downloads · 30 days
0
judesv/phi2-svHUCustxt
phi2-svHUCustxt is a text generation model from judesv. Use it when you need the model to write or continue text. The card lists the license as mit.
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/…
Downloads · 30 days
0
Access
Public
Updated Jun 3, 2025
Repo size
21 MB
Likes
1
Public
Click a slice to open those files.
.safetensors21 MB · 81%
From the Hugging Face model README
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.
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()