File size: 1,294 Bytes
16432d6
98b6ea5
 
8dc2d0c
98b6ea5
 
8dc2d0c
 
 
 
98b6ea5
16432d6
 
 
8dc2d0c
 
 
 
 
 
 
81a7abb
 
8dc2d0c
 
 
 
 
81a7abb
8dc2d0c
 
 
 
 
 
 
 
 
98b6ea5
16432d6
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import streamlit as st
import pandas as pd

def display_csv(file_path, columns_to_display):
    # Load the CSV file using pandas
    df = pd.read_csv(file_path)
    # Select only the specified columns
    df_selected_columns = df[columns_to_display]
    # Display the selected columns as a table
    st.write(df_selected_columns, height=500, width=1000, unsafe_allow_html=True)

def main():
    # Hardcoded file path
    file_path = "merged-averaged-model_timings_2.1.0_12.1_NVIDIA_A10G_False.csv"
    # Columns to display
    columns_to_display = [
        "model_name", "pretrained", "avg_score", "image_time", "text_time", 
         "image_shape", "text_shape", 
        "output shape", 
        "params (M)", "FLOPs (B)"
    ]  # Specify the columns you want to display
    
    # Add a text caption
    st.header("CSV Viewer")
    st.write("This app displays the contents of selected columns from a CSV file.")
    
    # Call the display_csv function with the hardcoded file path and selected columns
    display_csv(file_path, columns_to_display)

    # Custom CSS to make the app full screen
    st.markdown("""
    <style>
    .reportview-container {
        width: 100%;
        height: 100%;
    }
    </style>
    """, unsafe_allow_html=True)

if __name__ == "__main__":
    main()