Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -8,8 +8,7 @@ from transformers import TextIteratorStreamer
|
|
8 |
import numpy as np
|
9 |
|
10 |
# Model configuration and loading
|
11 |
-
|
12 |
-
model_name = "susnato/phi-2"
|
13 |
model_configuration = {
|
14 |
"prompt_template": "{instruction}",
|
15 |
"toeknizer_kwargs": {},
|
@@ -18,8 +17,7 @@ model_configuration = {
|
|
18 |
}
|
19 |
|
20 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
21 |
-
|
22 |
-
model = AutoModelForCausalLM.from_pretrained(model_dir)
|
23 |
tokenizer_kwargs = model_configuration.get("toeknizer_kwargs", {})
|
24 |
response_key = model_configuration.get("response_key")
|
25 |
tokenizer_response_key = None
|
|
|
8 |
import numpy as np
|
9 |
|
10 |
# Model configuration and loading
|
11 |
+
model_name = "susnato/phi-2" # Replace this with your Hugging Face model ID if necessary
|
|
|
12 |
model_configuration = {
|
13 |
"prompt_template": "{instruction}",
|
14 |
"toeknizer_kwargs": {},
|
|
|
17 |
}
|
18 |
|
19 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
20 |
+
model = AutoModelForCausalLM.from_pretrained(model_name)
|
|
|
21 |
tokenizer_kwargs = model_configuration.get("toeknizer_kwargs", {})
|
22 |
response_key = model_configuration.get("response_key")
|
23 |
tokenizer_response_key = None
|