import gradio as gr def greet(name): return "Hello " + name + "!!" # Use a pipeline as a high-level helper from transformers import pipeline messages = [ {"role": "user", "content": "Who are you?"}, ] pipe = pipeline("text-generation", model="cyan2k/molmo-7B-D-bnb-4bit", trust_remote_code=True) pipe(messages) # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("cyan2k/molmo-7B-D-bnb-4bit", trust_remote_code=True) demo = gr.Interface(fn=greet, inputs="text", outputs="text") demo.launch()