KAHRAMAN42 commited on
Commit
6a17722
·
verified ·
1 Parent(s): 95598b6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -10
app.py CHANGED
@@ -25,11 +25,10 @@ def youtube_url(url):
25
 
26
 
27
  def summarizer(prompt, base_url, model, api_key):
28
-
29
  """
30
- This function takes a prompt as input and uses the OpenAI API to generate a chat completion based on the prompt. It returns the summary of the chat completion.
31
  """
32
-
33
  system_msg = "you are a youtube transcript summarizer."
34
 
35
  client = OpenAI(api_key = api_key, base_url=base_url)
@@ -47,13 +46,7 @@ def summarizer(prompt, base_url, model, api_key):
47
 
48
  def main(url, model, api_key):
49
  """
50
- Function to summarize the transcript of a YouTube video using the provided URL.
51
-
52
- Parameters:
53
- url (str): The URL of the YouTube video.
54
-
55
- Returns:
56
- str: The summary of the video transcript.
57
  """
58
 
59
  if model == "deepseek-chat":
 
25
 
26
 
27
  def summarizer(prompt, base_url, model, api_key):
 
28
  """
29
+ This function takes a prompt, base_url, model, and api_key as parameters and uses the OpenAI API or DeepSeek API to generate a summary based on the prompt. It returns the generated summary.
30
  """
31
+
32
  system_msg = "you are a youtube transcript summarizer."
33
 
34
  client = OpenAI(api_key = api_key, base_url=base_url)
 
46
 
47
  def main(url, model, api_key):
48
  """
49
+ This function takes in a URL, model, and API key as parameters and returns a summary of the given transcript.
 
 
 
 
 
 
50
  """
51
 
52
  if model == "deepseek-chat":