google-gemma / app.py
richardkimsm89's picture
Create app.py
ec03c70 verified
raw
history blame
411 Bytes
from transformers import pipeline
import gradio as gr
pipeline = pipeline(model = "google/gemma-2b-it")
def inference(input):
output = pipeline(input)
return output[0]['generated_text']
app = gr.Interface(
fn = inference,
inputs = [gr.Textbox(label = "Input")],
outputs = [gr.Textbox(label = "Output")],
title = "Demo",
examples = [
["Hello, Gemma."]
]
)
app.launch()