Spaces:
Runtime error
Runtime error
extend column gpttitle
Browse files
app.py
CHANGED
|
@@ -247,8 +247,10 @@ def get_meta_info(video_id, url):
|
|
| 247 |
|
| 248 |
lextext = st.session_state.extract[0]
|
| 249 |
gpt_sum = '0'
|
|
|
|
| 250 |
if len(lextext) < 10:
|
| 251 |
gpt_sum = 'NA'
|
|
|
|
| 252 |
|
| 253 |
yt_img = f'http://img.youtube.com/vi/{video_id}/mqdefault.jpg'
|
| 254 |
yt_img_html = '<img src='+yt_img+' width="250" height="150" />'
|
|
@@ -268,7 +270,8 @@ def get_meta_info(video_id, url):
|
|
| 268 |
'Characters': [int(st.session_state.extract[3])],
|
| 269 |
'Tokens':[int(st.session_state.extract[4])],
|
| 270 |
'Lextext':[st.session_state.extract[0]],
|
| 271 |
-
'GPTSummary':[gpt_sum]
|
|
|
|
| 272 |
df_current_ts = pd.DataFrame({**video_info,**transcript_info})
|
| 273 |
|
| 274 |
return df_current_ts
|
|
|
|
| 247 |
|
| 248 |
lextext = st.session_state.extract[0]
|
| 249 |
gpt_sum = '0'
|
| 250 |
+
gpt_title = '0'
|
| 251 |
if len(lextext) < 10:
|
| 252 |
gpt_sum = 'NA'
|
| 253 |
+
gpt_title = 'NA'
|
| 254 |
|
| 255 |
yt_img = f'http://img.youtube.com/vi/{video_id}/mqdefault.jpg'
|
| 256 |
yt_img_html = '<img src='+yt_img+' width="250" height="150" />'
|
|
|
|
| 270 |
'Characters': [int(st.session_state.extract[3])],
|
| 271 |
'Tokens':[int(st.session_state.extract[4])],
|
| 272 |
'Lextext':[st.session_state.extract[0]],
|
| 273 |
+
'GPTSummary':[gpt_sum],
|
| 274 |
+
'GPTTitle':[gpt_title]}
|
| 275 |
df_current_ts = pd.DataFrame({**video_info,**transcript_info})
|
| 276 |
|
| 277 |
return df_current_ts
|