Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
-
from transformers import pipeline,
|
2 |
import gradio as gr
|
3 |
import spaces
|
4 |
# ignore_mismatched_sizes=True
|
5 |
tokenizer = AutoTokenizer.from_pretrained('models/google/gemma-2-9b')
|
6 |
-
model =
|
7 |
pipe = pipeline('text-generation', model=model,tokenizer = tokenizer)
|
8 |
|
9 |
@spaces.GPU(duration=120)
|
|
|
1 |
+
from transformers import pipeline,GemmaForCausalLM,AutoTokenizer
|
2 |
import gradio as gr
|
3 |
import spaces
|
4 |
# ignore_mismatched_sizes=True
|
5 |
tokenizer = AutoTokenizer.from_pretrained('models/google/gemma-2-9b')
|
6 |
+
model = GemmaForCausalLM.from_pretrained('models/google/gemma-2-9b',ignore_mismatched_sizes=True)
|
7 |
pipe = pipeline('text-generation', model=model,tokenizer = tokenizer)
|
8 |
|
9 |
@spaces.GPU(duration=120)
|