from transformers import AutoTokenizer import gradio as gr import transformers import torch model = "tiiuae/falcon-rw-1b" tokenizer = AutoTokenizer.from_pretrained(model) pipeline = transformers.pipeline( "text-generation", model=model, tokenizer=tokenizer, torch_dtype=torch.bfloat16, trust_remote_code=True, device_map="auto", ) gr.Interface.from_pipeline(pipeline).launch()