Spaces:
Runtime error
Runtime error
Commit
·
fa734d4
1
Parent(s):
d13e12a
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
import transformers
|
2 |
-
from transformers import AutoTokenizer,
|
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 =
|
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(
|