Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ from pydantic import BaseModel, field_validator
|
|
6 |
from transformers import (
|
7 |
AutoConfig,
|
8 |
pipeline,
|
9 |
-
|
10 |
AutoTokenizer,
|
11 |
GenerationConfig,
|
12 |
StoppingCriteriaList
|
@@ -82,10 +82,9 @@ class S3ModelLoader:
|
|
82 |
s3_uri, local_files_only=True
|
83 |
)
|
84 |
|
85 |
-
model =
|
86 |
s3_uri, config=config, local_files_only=True
|
87 |
)
|
88 |
-
|
89 |
|
90 |
tokenizer = AutoTokenizer.from_pretrained(
|
91 |
s3_uri, config=config, local_files_only=True
|
@@ -106,7 +105,7 @@ class S3ModelLoader:
|
|
106 |
model_name, config=config, token=HUGGINGFACE_HUB_TOKEN
|
107 |
)
|
108 |
|
109 |
-
model =
|
110 |
model_name, config=config, token=HUGGINGFACE_HUB_TOKEN
|
111 |
)
|
112 |
|
|
|
6 |
from transformers import (
|
7 |
AutoConfig,
|
8 |
pipeline,
|
9 |
+
AutoModelForCausalLM,
|
10 |
AutoTokenizer,
|
11 |
GenerationConfig,
|
12 |
StoppingCriteriaList
|
|
|
82 |
s3_uri, local_files_only=True
|
83 |
)
|
84 |
|
85 |
+
model = AutoModelForCausalLM.from_pretrained(
|
86 |
s3_uri, config=config, local_files_only=True
|
87 |
)
|
|
|
88 |
|
89 |
tokenizer = AutoTokenizer.from_pretrained(
|
90 |
s3_uri, config=config, local_files_only=True
|
|
|
105 |
model_name, config=config, token=HUGGINGFACE_HUB_TOKEN
|
106 |
)
|
107 |
|
108 |
+
model = AutoModelForCausalLM.from_pretrained(
|
109 |
model_name, config=config, token=HUGGINGFACE_HUB_TOKEN
|
110 |
)
|
111 |
|