Spaces:
Runtime error
Runtime error
arithescientist
commited on
Commit
•
ad63b2b
1
Parent(s):
6ee4162
Update app.py
Browse files
app.py
CHANGED
@@ -19,12 +19,13 @@ model_name = 'nlpaueb/legal-bert-base-uncased'
|
|
19 |
#model_name = 'laxya007/gpt2_legal'
|
20 |
# model_name = 'facebook/bart-large-cnn'
|
21 |
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
|
|
28 |
print('Using model {}\n'.format(model_name))
|
29 |
|
30 |
|
|
|
19 |
#model_name = 'laxya007/gpt2_legal'
|
20 |
# model_name = 'facebook/bart-large-cnn'
|
21 |
|
22 |
+
|
23 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
24 |
+
|
25 |
+
tokenizer = AutoTokenizer.from_pretrained("laxya007/gpt2_BSA_Legal_Initiproject_OE_OS_BRM")
|
26 |
+
|
27 |
+
model = AutoModelForCausalLM.from_pretrained("laxya007/gpt2_BSA_Legal_Initiproject_OE_OS_BRM")
|
28 |
+
bert_legal_model = Summarizer(custom_model= model, custom_tokenizer= tokenizer)
|
29 |
print('Using model {}\n'.format(model_name))
|
30 |
|
31 |
|