Commit
·
a3a951a
1
Parent(s):
4af5244
Update app.py
Browse files
app.py
CHANGED
@@ -3,8 +3,7 @@ import streamlit as st
|
|
3 |
def summarize_function(notes):
|
4 |
notes_input = tokenizer(notes, return_tensors='pt')
|
5 |
output = model(**notes_input)
|
6 |
-
max_length = len(output['logits'][0]) +
|
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]
|
|
|
3 |
def summarize_function(notes):
|
4 |
notes_input = tokenizer(notes, return_tensors='pt')
|
5 |
output = model(**notes_input)
|
6 |
+
max_length = len(output['logits'][0]) + 60
|
|
|
7 |
input_ids = notes_input.input_ids
|
8 |
gen_tokens = model.generate(input_ids, do_sample=True, temperature = 0.5, max_length=max_length)
|
9 |
gen_text = tokenizer.batch_decode(gen_tokens)[0]
|