Spaces:
Sleeping
Sleeping
from transformers import pipeline | |
import gradio as gr | |
pipe1 = pipeline(model = "google/gemma-2b-it") | |
#pipe2 = pipeline(model = "google/gemma-2-9b-it") | |
#pipe3 = pipeline(model = "google/gemma-2-27b-it") | |
def inference(input): | |
output = pipe1( | |
input | |
) | |
return output[0]['generated_text'][len(input):] | |
app = gr.Interface( | |
fn = inference, | |
inputs = [gr.Textbox(label = "Input")], | |
outputs = [gr.Textbox(label = "Output")], | |
title = "Demo", | |
examples = [ | |
["Hello, Gemma."] | |
] | |
).launch() |