andreinigo commited on
Commit
df31c6a
·
1 Parent(s): faa1a8b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -177,8 +177,10 @@ def summarize_meeting(filepath):
177
 
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": "Consolidate, and summarize the text of the meeting transcripts. The output format should be markdown in the same language as the meeting summary. 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. Meeting summary:"+ prompt_request})
 
177
 
178
  # Consolidate these meeting summaries.
179
  prompt_request = str(prompt_response)
180
+ tokens_PR = word_tokenize(text)
181
+ count_tokens_PR = len(tokens)
182
 
183
+ if count_tokens_PR <2000:
184
  # Summarize the text of the meeting transcripts.
185
  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."}]
186
  messages.append({"role": "user", "content": "Consolidate, and summarize the text of the meeting transcripts. The output format should be markdown in the same language as the meeting summary. 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. Meeting summary:"+ prompt_request})