terapyon commited on
Commit
2b515b3
·
1 Parent(s): 6aa600d

added audio link

Browse files
Files changed (1) hide show
  1. src/app.py +7 -1
src/app.py CHANGED
@@ -1,3 +1,4 @@
 
1
  import streamlit as st
2
  import duckdb
3
  from embedding import get_embeddings
@@ -71,4 +72,9 @@ if word:
71
  rows = selected["selection"].get("rows")
72
  if rows:
73
  row = rows[0]
74
- st.text(result.iloc[row, 3])
 
 
 
 
 
 
1
+ from datetime import timedelta
2
  import streamlit as st
3
  import duckdb
4
  from embedding import get_embeddings
 
72
  rows = selected["selection"].get("rows")
73
  if rows:
74
  row = rows[0]
75
+ text = result.iloc[row, 3]
76
+ start = result.iloc[row, 2].astype(float)
77
+ start_delta = timedelta(seconds=start)
78
+ st.write(f"Start time: {str(start_delta)}")
79
+ st.audio(result.iloc[row, 5], start_time=start-5.0)
80
+ st.text(text)