Spaces:
Runtime error
Runtime error
Commit
·
68664f3
1
Parent(s):
9d89cb5
Update app.py
Browse files
app.py
CHANGED
@@ -21,12 +21,10 @@ def get_response(input_text):
|
|
21 |
model_name = 'nlpaueb/legal-bert-base-uncased'
|
22 |
|
23 |
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
custom_model = AutoModel.from_pretrained(model_name, config=custom_config)
|
29 |
-
bert_legal_model = Summarizer(custom_model=custom_model, custom_tokenizer=custom_tokenizer)
|
30 |
|
31 |
|
32 |
output_text= bert_legal_model(input_text, min_length = 8, ratio = 0.05)
|
|
|
21 |
model_name = 'nlpaueb/legal-bert-base-uncased'
|
22 |
|
23 |
|
24 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name )
|
25 |
+
|
26 |
+
model = AutoModelForPreTraining.from_pretrained(model_name)
|
27 |
+
bert_legal_model = Summarizer(custom_model=model, custom_tokenizer=tokenizer)
|
|
|
|
|
28 |
|
29 |
|
30 |
output_text= bert_legal_model(input_text, min_length = 8, ratio = 0.05)
|