Skip to content

Commit

Permalink
Merge pull request #18 from nbcstevenchen/main
Browse files Browse the repository at this point in the history
Add "print exception" to track the error for the summaizer.
  • Loading branch information
rootfs authored May 17, 2024
2 parents 8cdaaeb + a1d8632 commit d88b191
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cncf-youtube-channel-summarizer/transcript_summarizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,13 @@ def run(self):
try:
summary, keywords = self.LLM_summarizer(self.llm_summary.to_langchain(), self.llm_keywords.to_langchain(), transcript,
chunk_size, chunk_overlap, key)
except:
except Exception as e:
logger.error(f"Failed to generate the summary and keywords for video: {key}")
logger.error(f"{e}")
missed_video_id = open('cncf-youtube-channel-summarizer/data/missed_video_id.txt', 'a')
missed_video_id.write(key)
continue
missed_video_id.write(key+',')
#continue
break

data = {'video_id': [key], 'video_title': [self.videos_dict[key]['video_title']],
'conference_name': [self.videos_dict[key]['play_list']['title']], 'summary': [summary],
Expand Down

0 comments on commit d88b191

Please sign in to comment.