sayhi / app.py
SmilingTree's picture
add pipeline
a4b8965
raw
history blame
339 Bytes
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()