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()