import gradio as gr from transformers import pipeline pipeline = pipeline(task="text-generation", model="google/gemma-2-2b") result = pipeline("the secret to baking a really good cake is ") def greet(name): # return "Hello " + name + "!!" return result demo = gr.Interface(fn=greet, inputs="text", outputs="text") demo.launch()