Skip to content

Commit fd48239

Browse files
authored
Merge pull request #19 from nbcstevenchen/main
Add the full path of prompt files
2 parents 6e34862 + 78fa39b commit fd48239

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

cncf-youtube-channel-summarizer/transcript_summarizer.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@ def create_models(self):
4747
def LLM_summarizer(self, llm_summary, llm_keywords, transcript, chunk_size, chunk_overlap, key):
4848
text_splitter = RecursiveCharacterTextSplitter(chunk_size=chunk_size, chunk_overlap=chunk_overlap)
4949
texts = text_splitter.create_documents([transcript])
50-
map_summary_template = open('prompt/chunks_summary_prompt.txt').readlines()
50+
map_summary_template = open('cncf-youtube-channel-summarizer/prompt/chunks_summary_prompt.txt').readlines()
5151
map_summary_template = ''.join(map_summary_template)
52-
combine_summary_template = open('prompt/combine_summary_prompt.txt').readlines()
52+
combine_summary_template = open('cncf-youtube-channel-summarizer/prompt/combine_summary_prompt.txt').readlines()
5353
combine_summary_template = ''.join(combine_summary_template)
5454

55-
keyword_template = open('prompt/keyword_template.txt').readlines()
55+
keyword_template = open('cncf-youtube-channel-summarizer/prompt/keyword_template.txt').readlines()
5656
keyword_template = ''.join(keyword_template)
5757

5858
map_prompt = PromptTemplate(template=map_summary_template, input_variables=["text"])
@@ -85,8 +85,7 @@ def run(self):
8585
logger.error(f"{e}")
8686
missed_video_id = open('cncf-youtube-channel-summarizer/data/missed_video_id.txt', 'a')
8787
missed_video_id.write(key+',')
88-
#continue
89-
break
88+
continue
9089

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

0 commit comments

Comments
 (0)