Spaces:
Sleeping
Sleeping
Update load_model.py
Browse files- load_model.py +5 -10
load_model.py
CHANGED
@@ -1,12 +1,7 @@
|
|
1 |
-
import
|
2 |
-
import requests
|
3 |
-
from dotenv import load_dotenv
|
4 |
-
|
5 |
-
load_dotenv()
|
6 |
-
api_key = os.getenv('HF_API_KEY')
|
7 |
-
model_path = os.getenv('MODEL_PATH')
|
8 |
|
9 |
def load_model():
|
10 |
-
|
11 |
-
|
12 |
-
|
|
|
|
1 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
def load_model():
|
4 |
+
model_name = "Erfan11/Neuracraft"
|
5 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
6 |
+
model = AutoModelForCausalLM.from_pretrained(model_name)
|
7 |
+
return model, tokenizer
|