Commit
·
171b76a
1
Parent(s):
412a1f8
Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ def summarize_function(notes):
|
|
4 |
notes_input = tokenizer(notes, return_tensors='pt')
|
5 |
output = model(**notes_input)
|
6 |
max_length = len(output['logits'][0]) + 35
|
7 |
-
# max_length = len(notes.split(' ')) +
|
8 |
input_ids = notes_input.input_ids
|
9 |
gen_tokens = model.generate(input_ids, do_sample=True, temperature = 0.5, max_length=max_length)
|
10 |
gen_text = tokenizer.batch_decode(gen_tokens)[0]
|
|
|
4 |
notes_input = tokenizer(notes, return_tensors='pt')
|
5 |
output = model(**notes_input)
|
6 |
max_length = len(output['logits'][0]) + 35
|
7 |
+
# max_length = len(notes.split(' ')) + 40
|
8 |
input_ids = notes_input.input_ids
|
9 |
gen_tokens = model.generate(input_ids, do_sample=True, temperature = 0.5, max_length=max_length)
|
10 |
gen_text = tokenizer.batch_decode(gen_tokens)[0]
|