Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,15 +1,2 @@
|
|
1 |
import gradio as gr
|
2 |
-
|
3 |
-
def generate_text(prompt, 100):
|
4 |
-
return model(prompt, max_tokens=100)
|
5 |
-
|
6 |
-
model = gr.load("models/google/gemma-2b-it")
|
7 |
-
|
8 |
-
iface = gr.Interface(
|
9 |
-
fn=generate_text,
|
10 |
-
outputs=gr.Textbox(label="Generated Text"),
|
11 |
-
title="Gemma 2B-IT Text Generation",
|
12 |
-
description="Generate text using the Google Gemma 2B-IT model. Adjust the slider to change the maximum number of new tokens generated."
|
13 |
-
)
|
14 |
-
|
15 |
-
iface.launch()
|
|
|
1 |
import gradio as gr
|
2 |
+
gr.load("models/google/gemma-2-2b-it").launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|