Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
import subprocess
|
| 3 |
-
import pandas as pd
|
| 4 |
|
| 5 |
# Function to install libraries
|
| 6 |
def install_libraries():
|
|
@@ -36,17 +36,21 @@ def main():
|
|
| 36 |
|
| 37 |
start_index = st.session_state.get('start_index', 0)
|
| 38 |
end_index = start_index + 6
|
| 39 |
-
|
| 40 |
# Create DataFrame from captions_list
|
| 41 |
df = pd.DataFrame(captions_list)
|
| 42 |
|
| 43 |
# Display caption table with st.table
|
|
|
|
|
|
|
|
|
|
| 44 |
with open("styles.css", "r") as f:
|
| 45 |
css = f.read()
|
| 46 |
|
| 47 |
# Embed the CSS into Streamlit
|
| 48 |
st.markdown(f"<style>{css}</style>", unsafe_allow_html=True)
|
| 49 |
-
|
|
|
|
| 50 |
st.table(df[['Timestamp', 'Original']].iloc[start_index:end_index])
|
| 51 |
|
| 52 |
# Larger previous button
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
import subprocess
|
| 3 |
+
import pandas as pd
|
| 4 |
|
| 5 |
# Function to install libraries
|
| 6 |
def install_libraries():
|
|
|
|
| 36 |
|
| 37 |
start_index = st.session_state.get('start_index', 0)
|
| 38 |
end_index = start_index + 6
|
| 39 |
+
|
| 40 |
# Create DataFrame from captions_list
|
| 41 |
df = pd.DataFrame(captions_list)
|
| 42 |
|
| 43 |
# Display caption table with st.table
|
| 44 |
+
st.write("## Caption Table")
|
| 45 |
+
|
| 46 |
+
# Read the content of the CSS file
|
| 47 |
with open("styles.css", "r") as f:
|
| 48 |
css = f.read()
|
| 49 |
|
| 50 |
# Embed the CSS into Streamlit
|
| 51 |
st.markdown(f"<style>{css}</style>", unsafe_allow_html=True)
|
| 52 |
+
|
| 53 |
+
# Display styled table using st.table
|
| 54 |
st.table(df[['Timestamp', 'Original']].iloc[start_index:end_index])
|
| 55 |
|
| 56 |
# Larger previous button
|