Basic1 / app.py
rsatish1110's picture
Create new file
c392459
raw
history blame contribute delete
258 Bytes
from transformers import pipeline
model = pipeline("text-generation")
def predict(prompt):
completion = model(prompt)[0]["generated_text"]
return completion
import gradio as gr
gr.Interface(fn=predict, inputs="text", outputs="text").launch()