File size: 259 Bytes
db51fd6
ca5aee7
b73395f
ca5aee7
5e146d9
 
 
 
 
1
2
3
4
5
6
7
8
9
import gradio as gr
from transformers import pipeline

pipe = pipeline('text-generation', model='facebook/opt-350m')
input = gr.Interface.TextBox()
output = gr.Interface.TextBox()

intf = gr.Interface(fn = pipe, inputs = input, outputs = output)
intf.launch()