Spaces:
Runtime error
Runtime error
titlesim
Browse files
app.py
CHANGED
@@ -248,9 +248,11 @@ def get_meta_info(video_id, url):
|
|
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" />'
|
@@ -271,7 +273,8 @@ def get_meta_info(video_id, url):
|
|
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
|
|
|
248 |
lextext = st.session_state.extract[0]
|
249 |
gpt_sum = '0'
|
250 |
gpt_title = '0'
|
251 |
+
title_sim = '0'
|
252 |
if len(lextext) < 10:
|
253 |
gpt_sum = 'NA'
|
254 |
gpt_title = 'NA'
|
255 |
+
title_sim = 'NA'
|
256 |
|
257 |
yt_img = f'http://img.youtube.com/vi/{video_id}/mqdefault.jpg'
|
258 |
yt_img_html = '<img src='+yt_img+' width="250" height="150" />'
|
|
|
273 |
'Tokens':[int(st.session_state.extract[4])],
|
274 |
'Lextext':[st.session_state.extract[0]],
|
275 |
'GPTSummary':[gpt_sum],
|
276 |
+
'GPTTitle':[gpt_title],
|
277 |
+
'Titlesim':[title_sim]}
|
278 |
df_current_ts = pd.DataFrame({**video_info,**transcript_info})
|
279 |
|
280 |
return df_current_ts
|