bryanmildort commited on
Commit
412a1f8
·
1 Parent(s): ef0a8c0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -2,9 +2,9 @@ import streamlit as st
2
 
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]) + 35
7
- max_length = len(notes.split(' ')) + 35
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]
 
2
 
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]) + 35
7
+ # max_length = len(notes.split(' ')) + 35
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]