mdeniz1 commited on
Commit
dfd7edf
·
1 Parent(s): c29df4d

api_key added

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -3,6 +3,10 @@ from langchain_groq import ChatGroq
3
  from youtube_transcript_api import YouTubeTranscriptApi
4
  from langchain_core.prompts import ChatPromptTemplate
5
  from langchain_core.output_parsers import StrOutputParser
 
 
 
 
6
 
7
  def get_transcript(video_id):
8
  def transcript_to_string(transcript):
@@ -34,6 +38,7 @@ def summarize_video(video_url, language):
34
  max_tokens=None,
35
  timeout=None,
36
  max_retries=2,
 
37
  )
38
 
39
  system_template = """Below you will see a text. Read the text. First provide the major points that they discuss and then provide summaries for each major point. Your response should be in the language specified below.
 
3
  from youtube_transcript_api import YouTubeTranscriptApi
4
  from langchain_core.prompts import ChatPromptTemplate
5
  from langchain_core.output_parsers import StrOutputParser
6
+ import os
7
+
8
+ api_key = os.getenv('GROQ_API_KEY')
9
+
10
 
11
  def get_transcript(video_id):
12
  def transcript_to_string(transcript):
 
38
  max_tokens=None,
39
  timeout=None,
40
  max_retries=2,
41
+ api_key=api_key
42
  )
43
 
44
  system_template = """Below you will see a text. Read the text. First provide the major points that they discuss and then provide summaries for each major point. Your response should be in the language specified below.