Karzan commited on
Commit
145884e
·
verified ·
1 Parent(s): 94029d9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,9 +1,9 @@
1
- from transformers import pipeline,LlamaForCausalLM,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 = LlamaForCausalLM.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)
 
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)