Spaces:
Running
Running
arithescientist
commited on
Commit
•
2f9a1ee
1
Parent(s):
be03ede
Update app.py
Browse files
app.py
CHANGED
@@ -49,13 +49,9 @@ model_name = 'nlpaueb/legal-bert-base-uncased'
|
|
49 |
print("lets go")
|
50 |
|
51 |
custom_config = AutoConfig.from_pretrained(model_name)
|
52 |
-
print("lets go")
|
53 |
custom_config.output_hidden_states=True
|
54 |
-
print("lets go")
|
55 |
custom_tokenizer = AutoTokenizer.from_pretrained(model_name)
|
56 |
-
|
57 |
-
#custom_model = AutoModel.from_pretrained(model_name, config=custom_config)
|
58 |
-
print("lets go")
|
59 |
bert_legal_model = Summarizer(custom_model=custom_model, custom_tokenizer=custom_tokenizer)
|
60 |
print('Using model {}\n'.format(model_name))
|
61 |
|
@@ -286,6 +282,6 @@ def uploads2():
|
|
286 |
|
287 |
|
288 |
if __name__ == "__main__":
|
289 |
-
app.run(
|
290 |
|
291 |
|
|
|
49 |
print("lets go")
|
50 |
|
51 |
custom_config = AutoConfig.from_pretrained(model_name)
|
|
|
52 |
custom_config.output_hidden_states=True
|
|
|
53 |
custom_tokenizer = AutoTokenizer.from_pretrained(model_name)
|
54 |
+
custom_model = AutoModel.from_pretrained(model_name, config=custom_config)
|
|
|
|
|
55 |
bert_legal_model = Summarizer(custom_model=custom_model, custom_tokenizer=custom_tokenizer)
|
56 |
print('Using model {}\n'.format(model_name))
|
57 |
|
|
|
282 |
|
283 |
|
284 |
if __name__ == "__main__":
|
285 |
+
app.run()
|
286 |
|
287 |
|