suil0109 commited on
Commit
af6c0c9
Β·
1 Parent(s): cd2a8a1

UI Changed

Browse files
Files changed (1) hide show
  1. app.py +42 -42
app.py CHANGED
@@ -58,47 +58,6 @@ with gr.Blocks(css=css, title="YouTube Analyzer Pro - Specialized Analysis") as
58
  """)
59
 
60
  with gr.Tabs():
61
-
62
- with gr.Tab("🎯 Youtube Single Video Analysis"):
63
- with gr.Tabs():
64
- with gr.TabItem("YouTube Channel: Single Video"):
65
- with gr.Row():
66
- with gr.Column(scale=2):
67
- video_id = gr.Textbox(
68
- label="YouTube Video ID",
69
- value="hTSaweR8qMI",
70
- placeholder="Enter video ID...",
71
- info="πŸ’‘ The video ID is the part after 'v=' in a YouTube URL\nπŸ“Ί Example: youtube.com/watch?v=dQw4w9WgXcQ β†’ Enter: dQw4w9WgXcQ"
72
- )
73
- with gr.Column(scale=1):
74
- comment_limit_slider = gr.Slider(
75
- minimum=10,
76
- maximum=50,
77
- value=25,
78
- step=5,
79
- label="πŸ“Š Major Comments to Analyze",
80
- info="🎯 Select 10-50 comments for analysis"
81
- )
82
-
83
- video_btn = gr.Button("πŸš€ Analyze Video In Depth :) ~40s", variant="primary")
84
-
85
- with gr.Row():
86
- with gr.Column(scale=2):
87
- video_result = gr.Markdown(label="πŸ“Š Comprehensive Analysis Report")
88
-
89
- with gr.Column(scale=1):
90
- gr.HTML("<h3 style='text-align:center; margin:10px;'>πŸ† Analytics Dashboard</h3>")
91
-
92
- video_info_display = gr.Markdown(label="πŸ“Ή Video Information")
93
- sentiment_chart = gr.Image(label="πŸ’¬ Sentiment Analysis Dashboard", type="pil")
94
- opinion_chart = gr.Image(label="πŸ‘₯ Public Opinion Analysis", type="pil")
95
-
96
- video_btn.click(
97
- fn=lambda video_id, comment_limit: comment_analyzer(video_id, comment_limit),
98
- inputs=[video_id, comment_limit_slider],
99
- outputs=[video_result, video_info_display, sentiment_chart, opinion_chart],
100
- show_progress=True
101
- )
102
 
103
  with gr.Tab("πŸ“Š Youtube Channel Specialized Analysis"):
104
  gr.HTML("<h2 style='text-align:center; color:#2C3E50; margin:20px 0;'>πŸ” Choose Your Analysis Type ~60s</h2>")
@@ -163,7 +122,48 @@ with gr.Blocks(css=css, title="YouTube Analyzer Pro - Specialized Analysis") as
163
  outputs=[analysis_result, dashboard_plot],
164
  show_progress=True
165
  )
166
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
167
  gr.HTML("""
168
  <div style='text-align:center; margin-top:40px; padding:20px; background:rgba(0,0,0,0.05); border-radius:15px;'>
169
  <p style='color:#7F8C8D; font-size:0.9em; margin:0;'>
 
58
  """)
59
 
60
  with gr.Tabs():
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
61
 
62
  with gr.Tab("πŸ“Š Youtube Channel Specialized Analysis"):
63
  gr.HTML("<h2 style='text-align:center; color:#2C3E50; margin:20px 0;'>πŸ” Choose Your Analysis Type ~60s</h2>")
 
122
  outputs=[analysis_result, dashboard_plot],
123
  show_progress=True
124
  )
125
+
126
+ with gr.Tab("🎯 Youtube Single Video Analysis"):
127
+ with gr.Tabs():
128
+ with gr.TabItem("YouTube Channel: Single Video"):
129
+ with gr.Row():
130
+ with gr.Column(scale=2):
131
+ video_id = gr.Textbox(
132
+ label="YouTube Video ID",
133
+ value="hTSaweR8qMI",
134
+ placeholder="Enter video ID...",
135
+ info="πŸ’‘ The video ID is the part after 'v=' in a YouTube URL\nπŸ“Ί Example: youtube.com/watch?v=dQw4w9WgXcQ β†’ Enter: dQw4w9WgXcQ"
136
+ )
137
+ with gr.Column(scale=1):
138
+ comment_limit_slider = gr.Slider(
139
+ minimum=10,
140
+ maximum=50,
141
+ value=25,
142
+ step=5,
143
+ label="πŸ“Š Major Comments to Analyze",
144
+ info="🎯 Select 10-50 comments for analysis"
145
+ )
146
+
147
+ video_btn = gr.Button("πŸš€ Analyze Video In Depth :) ~40s", variant="primary")
148
+
149
+ with gr.Row():
150
+ with gr.Column(scale=2):
151
+ video_result = gr.Markdown(label="πŸ“Š Comprehensive Analysis Report")
152
+
153
+ with gr.Column(scale=1):
154
+ gr.HTML("<h3 style='text-align:center; margin:10px;'>πŸ† Analytics Dashboard</h3>")
155
+
156
+ video_info_display = gr.Markdown(label="πŸ“Ή Video Information")
157
+ sentiment_chart = gr.Image(label="πŸ’¬ Sentiment Analysis Dashboard", type="pil")
158
+ opinion_chart = gr.Image(label="πŸ‘₯ Public Opinion Analysis", type="pil")
159
+
160
+ video_btn.click(
161
+ fn=lambda video_id, comment_limit: comment_analyzer(video_id, comment_limit),
162
+ inputs=[video_id, comment_limit_slider],
163
+ outputs=[video_result, video_info_display, sentiment_chart, opinion_chart],
164
+ show_progress=True
165
+ )
166
+
167
  gr.HTML("""
168
  <div style='text-align:center; margin-top:40px; padding:20px; background:rgba(0,0,0,0.05); border-radius:15px;'>
169
  <p style='color:#7F8C8D; font-size:0.9em; margin:0;'>