Spaces:
Runtime error
Runtime error
bryanmildort
commited on
Commit
•
2b7f563
1
Parent(s):
898d20c
Update app.py
Browse files
app.py
CHANGED
@@ -2,7 +2,7 @@ import streamlit as st
|
|
2 |
import re
|
3 |
|
4 |
def summarize_function(notes):
|
5 |
-
gen_text = pipe(notes,
|
6 |
for i in range(len(gen_text)):
|
7 |
if gen_text[-i-8:].startswith('[Notes]:'):
|
8 |
gen_text = gen_text[:-i-8]
|
|
|
2 |
import re
|
3 |
|
4 |
def summarize_function(notes):
|
5 |
+
gen_text = pipe(notes, max_new_tokens=(len(notes.split(' '))*2*.215), temperature=0.8, num_return_sequences=1, top_p=0.2)[0]['generated_text'][len(notes):]
|
6 |
for i in range(len(gen_text)):
|
7 |
if gen_text[-i-8:].startswith('[Notes]:'):
|
8 |
gen_text = gen_text[:-i-8]
|