pavan-genai commited on
Commit
00cac89
·
verified ·
1 Parent(s): 89bab98

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -14
app.py CHANGED
@@ -59,18 +59,13 @@ def get_transcript(youtube_url):
59
  except Exception as e:
60
  print(f"Could not retrieve transcript: {e}")
61
 
62
- if __name__ == "__main__":
63
- # url = input("Enter YouTube video URL: ")
64
- # url = "https://www.youtube.com/watch?v=1CwHTRGLyjE"
65
- # summarized_text = get_transcript(url)
66
- # if summarized_text:
67
- # print("Summary:\n", summarized_text)
68
- gr.close_all()
69
 
70
- # demo = gr.Interface(fn=summary, inputs="text",outputs="text")
71
- demo = gr.Interface(fn=get_transcript,
72
- inputs=[gr.Textbox(label="Input Youtube URL to summarize", lines=1)],
73
- outputs=[gr.Textbox(label="Summarized text", lines=4)],
74
- title="@pavan-genai Project 2: Youtube Script Summarizer",
75
- description="THIS APPLICATION WILL BE USED TO SUMMARIZE THE YOUTUBE VIDEO")
76
- demo.launch()
 
 
 
59
  except Exception as e:
60
  print(f"Could not retrieve transcript: {e}")
61
 
 
 
 
 
 
 
 
62
 
63
+ gr.close_all()
64
+
65
+ # demo = gr.Interface(fn=summary, inputs="text",outputs="text")
66
+ demo = gr.Interface(fn=get_transcript,
67
+ inputs=[gr.Textbox(label="Input Youtube URL to summarize", lines=1)],
68
+ outputs=[gr.Textbox(label="Summarized text", lines=4)],
69
+ title="@pavan-genai Project 2: Youtube Script Summarizer",
70
+ description="THIS APPLICATION WILL BE USED TO SUMMARIZE THE YOUTUBE VIDEO")
71
+ demo.launch()