WildKratts commited on
Commit
effddd8
1 Parent(s): c5a69a8

Chunking Summary Fixed

Browse files
Files changed (1) hide show
  1. YTSumv2.py +3 -2
YTSumv2.py CHANGED
@@ -102,7 +102,7 @@ def generate_summary(text):
102
  response = openai.ChatCompletion.create(
103
  model="gpt-3.5-turbo-16k-0613",
104
  messages=[
105
- {"role": "system", "content": "You are a world bestsummarizer. Condense the transcript text, capturing essential points and core points. Include relevant examples, omit excess details, and ensure the summary's length matches the original's complexity."},
106
  {"role": "user", "content": f"Please summarize the following text:\n{text}\nSummary:"},
107
  ],
108
  max_tokens=11000,
@@ -155,6 +155,7 @@ if __name__ == "__main__":
155
  transcripts = transcribe_audio_dir(output_dir)
156
  os.remove(audio_file_path) # Delete saved audio file
157
  st.subheader("Summary")
158
- st.write(transcripts[0])
 
159
  else: # If API key is not provided
160
  st.warning("Please Enter OpenAI API Key") # Display warning message
 
102
  response = openai.ChatCompletion.create(
103
  model="gpt-3.5-turbo-16k-0613",
104
  messages=[
105
+ {"role": "system", "content": "You are a world's best Wild Kratts episode summarizer. Condense the transcript text, capturing essential points and core plot points. Include relevant examples, omit excess details, and ensure the summary's length matches the original's complexity."},
106
  {"role": "user", "content": f"Please summarize the following text:\n{text}\nSummary:"},
107
  ],
108
  max_tokens=11000,
 
155
  transcripts = transcribe_audio_dir(output_dir)
156
  os.remove(audio_file_path) # Delete saved audio file
157
  st.subheader("Summary")
158
+ for transcript in transcripts: # Loop through the transcripts list
159
+ st.write(transcript)
160
  else: # If API key is not provided
161
  st.warning("Please Enter OpenAI API Key") # Display warning message