eddyejembi commited on
Commit
fa734d4
·
1 Parent(s): d13e12a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,5 +1,5 @@
1
  import transformers
2
- from transformers import AutoTokenizer, AutoModel
3
  import torch
4
  from transformers import pipeline
5
  import gradio as gr
@@ -7,7 +7,7 @@ import gradio as gr
7
  llama_model = "meta-llama/Llama-2-7b-chat-hf"
8
  access_token = "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"
9
 
10
- model = AutoModel.from_pretrained(llama_model, token=access_token)
11
  tokenizer = AutoTokenizer.from_pretrained(llama_model, token=access_token)
12
 
13
  pipeline = transformers.pipeline(
 
1
  import transformers
2
+ from transformers import AutoTokenizer, AutoModelForCausalLM
3
  import torch
4
  from transformers import pipeline
5
  import gradio as gr
 
7
  llama_model = "meta-llama/Llama-2-7b-chat-hf"
8
  access_token = "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"
9
 
10
+ model = AutoModelForCausalLM.from_pretrained(llama_model, token=access_token)
11
  tokenizer = AutoTokenizer.from_pretrained(llama_model, token=access_token)
12
 
13
  pipeline = transformers.pipeline(