owaiskha9654 commited on
Commit
02de3fd
·
1 Parent(s): 647f7c6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -3
app.py CHANGED
@@ -2,7 +2,7 @@ from transformers import pipeline
2
  from youtube_transcript_api import YouTubeTranscriptApi
3
  import gradio as gr
4
 
5
- def summarize(youtube_video):
6
  video_id = youtube_video.split("=")[1]
7
  transcript = YouTubeTranscriptApi.get_transcript(video_id)
8
 
@@ -28,6 +28,15 @@ def summarize(youtube_video):
28
  # inp = input_text.replace('\n','')
29
  output_text=' '.join(summarized_text)
30
  return output_text
31
-
32
- App= gr.Interface(fn=summarize, inputs="text", outputs="text")
 
 
 
 
 
 
 
 
 
33
  App.launch()
 
2
  from youtube_transcript_api import YouTubeTranscriptApi
3
  import gradio as gr
4
 
5
+ def summarize(Youtube_video_Link):
6
  video_id = youtube_video.split("=")[1]
7
  transcript = YouTubeTranscriptApi.get_transcript(video_id)
8
 
 
28
  # inp = input_text.replace('\n','')
29
  output_text=' '.join(summarized_text)
30
  return output_text
31
+
32
+ title = "YouTube Live Video Summarization"
33
+ examples = [
34
+ ("https://www.youtube.com/watch?v=zKvd1JwJ4Po"),
35
+ ("https://www.youtube.com/watch?v=9izcbNYmP8M"),
36
+ ]
37
+ text1 = (
38
+ "<center> Author: Owais Ahmad Data Scientist at <b> Thoucentric </b> <a href=\"https://www.linkedin.com/in/owaiskhan9654/\">Visit Profile</a> <br></center>"
39
+ "<center> Kaggle Profile <a href=\"https://www.kaggle.com/owaiskhan9654\">Link</a> <br> </center>"
40
+ )
41
+ App= gr.Interface(fn=summarize, inputs="text", outputs="text", examples=examples, title=title, description=description,article=Text1)
42
  App.launch()