Spaces:
Runtime error
Runtime error
missing column
Browse files
app.py
CHANGED
@@ -355,11 +355,6 @@ if st.button('Extract Sentences'):
|
|
355 |
if 'extract' not in st.session_state:
|
356 |
st.error('Please run extraction first.', icon="🚨")
|
357 |
else:
|
358 |
-
transcript_info = {'Words':[int(st.session_state.extract[1])],
|
359 |
-
'Sentences': [int(st.session_state.extract[2])],
|
360 |
-
'Characters': [int(st.session_state.extract[3])],
|
361 |
-
'Tokens':[int(st.session_state.extract[4])],
|
362 |
-
'Lextext':[st.session_state.extract[0]]}
|
363 |
|
364 |
yt_img = f'http://img.youtube.com/vi/{video_id}/mqdefault.jpg'
|
365 |
yt_img_html = '<img src='+yt_img+' width="250" height="150" />'
|
@@ -373,6 +368,13 @@ if st.button('Extract Sentences'):
|
|
373 |
'Views':[st.session_state["video_data"]["Views"][0]],
|
374 |
'Length':[st.session_state["video_data"]["Length"][0]],
|
375 |
'Keywords':['; '.join(st.session_state["keywords"])]}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
376 |
df_current_ts = pd.DataFrame({**video_info,**transcript_info})
|
377 |
st.write(df_current_ts)
|
378 |
|
|
|
355 |
if 'extract' not in st.session_state:
|
356 |
st.error('Please run extraction first.', icon="🚨")
|
357 |
else:
|
|
|
|
|
|
|
|
|
|
|
358 |
|
359 |
yt_img = f'http://img.youtube.com/vi/{video_id}/mqdefault.jpg'
|
360 |
yt_img_html = '<img src='+yt_img+' width="250" height="150" />'
|
|
|
368 |
'Views':[st.session_state["video_data"]["Views"][0]],
|
369 |
'Length':[st.session_state["video_data"]["Length"][0]],
|
370 |
'Keywords':['; '.join(st.session_state["keywords"])]}
|
371 |
+
|
372 |
+
transcript_info = {'Words':[int(st.session_state.extract[1])],
|
373 |
+
'Sentences': [int(st.session_state.extract[2])],
|
374 |
+
'Characters': [int(st.session_state.extract[3])],
|
375 |
+
'Tokens':[int(st.session_state.extract[4])],
|
376 |
+
'Lextext':[st.session_state.extract[0]],
|
377 |
+
'GPTSummary':[0]}
|
378 |
df_current_ts = pd.DataFrame({**video_info,**transcript_info})
|
379 |
st.write(df_current_ts)
|
380 |
|