arithescientist commited on
Commit
36aa75d
·
1 Parent(s): 8c2fbce

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -6
app.py CHANGED
@@ -28,7 +28,6 @@ bert_legal_model = Summarizer(custom_model=custom_model, custom_tokenizer=custom
28
  print('Using model {}\n'.format(model_name))
29
 
30
 
31
-
32
  def lincoln(content):
33
  summary_text = ""
34
  for i, paragraph in enumerate(content.split("\n\n")):
@@ -57,16 +56,13 @@ def lincoln(content):
57
  text = paragraph
58
  # encoding the input text
59
 
60
- summary = bert_legal_model(content, ratio = 0.01)
61
  # summary = tokenizer_t5.decode(summary_ids[0], skip_special_tokens=True)
62
  summary_text += str(summary) + "\n\n"
63
  print("Summary:")
64
  print(summary)
65
 
66
- summary = bert_legal_model(content, ratio=0.1)
67
-
68
- all_text = str(summary) + "\n\n\n" \
69
- + "-------- The Larger Summary --------\n" + str(summary_text)
70
 
71
  return all_text
72
 
 
28
  print('Using model {}\n'.format(model_name))
29
 
30
 
 
31
  def lincoln(content):
32
  summary_text = ""
33
  for i, paragraph in enumerate(content.split("\n\n")):
 
56
  text = paragraph
57
  # encoding the input text
58
 
59
+ summary = bert_legal_model(content, min_length = 8, num_sentences = 2)
60
  # summary = tokenizer_t5.decode(summary_ids[0], skip_special_tokens=True)
61
  summary_text += str(summary) + "\n\n"
62
  print("Summary:")
63
  print(summary)
64
 
65
+ all_text = str(summary_text)
 
 
 
66
 
67
  return all_text
68