Check / app.py
Vivek12345323's picture
Update app.py
4c121be verified
raw
history blame
425 Bytes
import gradio as gr
from transformers import pipeline
# Load a free, public text-generation model
pipe = pipeline("text-generation", model="mrm8488/t5-base-finetuned-common_gen")
# Define your function
def respond(prompt):
output = pipe(prompt, max_new_tokens=50)[0]['generated_text']
return output
# Build the interface
gr.Interface(fn=respond, inputs="text", outputs="text", title="Free AI Essay Bot").launch()