File size: 259 Bytes
a95e4f3
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
from transformers import pipeline
import gradio as gr

instruct_pipeline = pipeline(model="databricks/dolly-v2-12b", trust_remote_code=True, device_map="auto")

def infer(x):
    return instruct_pipeline(x)

gr.Interface(infer, "textbox", "textbox").launch()