Spaces:
Runtime error
Runtime error
thepolymerguy
commited on
Commit
•
5148083
1
Parent(s):
5ab8e56
Update app.py
Browse files
app.py
CHANGED
@@ -26,11 +26,13 @@ all_stopwords = stopwords.words('english') # Making sure to only use English sto
|
|
26 |
extra_stopwords = ['ii', 'iii'] # Can add extra stopwords to be removed from dataset/input abstracts
|
27 |
all_stopwords.extend(extra_stopwords)
|
28 |
|
|
|
|
|
29 |
########### GET CLAIMED TRAINED MODEL ###########
|
30 |
-
tokenizer = LlamaTokenizer.from_pretrained(
|
31 |
|
32 |
model = LlamaForCausalLM.from_pretrained(
|
33 |
-
|
34 |
load_in_8bit=True,
|
35 |
device_map='auto',
|
36 |
)
|
|
|
26 |
extra_stopwords = ['ii', 'iii'] # Can add extra stopwords to be removed from dataset/input abstracts
|
27 |
all_stopwords.extend(extra_stopwords)
|
28 |
|
29 |
+
modelpath = os.environ.get("MODEL_PATH")
|
30 |
+
|
31 |
########### GET CLAIMED TRAINED MODEL ###########
|
32 |
+
tokenizer = LlamaTokenizer.from_pretrained(modelpath)
|
33 |
|
34 |
model = LlamaForCausalLM.from_pretrained(
|
35 |
+
modelpath,
|
36 |
load_in_8bit=True,
|
37 |
device_map='auto',
|
38 |
)
|