File size: 299 Bytes
fc9a365
c274baa
fc9a365
 
 
 
 
 
1
2
3
4
5
6
7
8
import gradio as gr
import torch
from transformers import pipeline

generate_text = pipeline(model="databricks/dolly-v2-3b", torch_dtype=torch.bfloat16, trust_remote_code=True, device_map="auto")

interface = gr.Interface(fn=generate_text, inputs='text', outputs='text')
interface.launch(share=True)