Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,18 +1,8 @@
|
|
| 1 |
-
from transformers import pipeline
|
| 2 |
import gradio as gr
|
| 3 |
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
def inference(input):
|
| 9 |
-
output = pipe1(
|
| 10 |
-
input
|
| 11 |
-
)
|
| 12 |
-
return output[0]['generated_text'][len(input):]
|
| 13 |
-
|
| 14 |
-
app = gr.Interface(
|
| 15 |
-
fn = inference,
|
| 16 |
inputs = [gr.Textbox(label = "Input")],
|
| 17 |
outputs = [gr.Textbox(label = "Output")],
|
| 18 |
title = "Demo",
|
|
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
+
app = gr.load(
|
| 4 |
+
google/gemma-2-2b-it,
|
| 5 |
+
src = "models",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
inputs = [gr.Textbox(label = "Input")],
|
| 7 |
outputs = [gr.Textbox(label = "Output")],
|
| 8 |
title = "Demo",
|