Spaces:
Running
Running
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() |