roastbot-api / app.py
Dikshan1234's picture
Create app.py
03715b2 verified
Raw
History Blame Contribute Delete
566 Bytes
import gradio as gr
from transformers import pipeline
MODEL_ID = "Dikshan1234/RoastBot"
generator = pipeline(
"text-generation",
model=MODEL_ID,
device=-1
)
def roast(text):
out = generator(
f"Generate a savage roast: {text}",
max_new_tokens=200,
temperature=0.9,
do_sample=True
)
return out[0]["generated_text"]
gr.Interface(
fn=roast,
inputs=gr.Textbox(placeholder="Type something to roast"),
outputs="text",
title="🔥 RoastBot",
description="Savage AI Roasting Machine"
).launch()