Commit
·
17ae380
1
Parent(s):
7e59619
Update app.py
Browse files
app.py
CHANGED
@@ -114,7 +114,7 @@ def break_up_file(tokens, chunk_size, overlap_size):
|
|
114 |
yield from break_up_file(tokens[chunk_size-overlap_size:], chunk_size, overlap_size)
|
115 |
|
116 |
|
117 |
-
def break_up_file_to_chunks(filename, chunk_size=
|
118 |
with open(filename, 'r') as f:
|
119 |
text = f.read()
|
120 |
tokens = word_tokenize(text)
|
@@ -178,7 +178,7 @@ def summarize_meeting(filepath):
|
|
178 |
# Consolidate these meeting summaries.
|
179 |
prompt_request = str(prompt_response)
|
180 |
|
181 |
-
if count_tokens(prompt_request)>
|
182 |
# Summarize the text of the meeting transcripts.
|
183 |
messages = [{"role": "system", "content": "Consolidate, and summarize the text of the meeting transcripts. The output format should be markdown in the same language as the user's input. Start with a brief summary of the meeting, continue with bullets outlining the most important points of discussion. Finally, provide a table to show the list of action items with 3 columns: Action, Assigned Person, Due Date."}]
|
184 |
messages.append({"role": "user", "content": prompt_request})
|
|
|
114 |
yield from break_up_file(tokens[chunk_size-overlap_size:], chunk_size, overlap_size)
|
115 |
|
116 |
|
117 |
+
def break_up_file_to_chunks(filename, chunk_size=2000, overlap_size=100):
|
118 |
with open(filename, 'r') as f:
|
119 |
text = f.read()
|
120 |
tokens = word_tokenize(text)
|
|
|
178 |
# Consolidate these meeting summaries.
|
179 |
prompt_request = str(prompt_response)
|
180 |
|
181 |
+
if count_tokens(prompt_request)>2000:
|
182 |
# Summarize the text of the meeting transcripts.
|
183 |
messages = [{"role": "system", "content": "Consolidate, and summarize the text of the meeting transcripts. The output format should be markdown in the same language as the user's input. Start with a brief summary of the meeting, continue with bullets outlining the most important points of discussion. Finally, provide a table to show the list of action items with 3 columns: Action, Assigned Person, Due Date."}]
|
184 |
messages.append({"role": "user", "content": prompt_request})
|