TextGen-GPT2 / app.py
MUTSC's picture
Update app.py
9e7b1e9 verified
raw
history blame
255 Bytes
import gradio as gr
from transformers import pipeline
model = pipeline("text-generation")
def predict(prompt):
completion = model(prompt)[0]["generated_text"]
return completion
gr.Interface(fn=predict, inputs="text", outputs="text").launch()