Jesse-marqo commited on
Commit
16432d6
1 Parent(s): f7e42a5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -14
app.py CHANGED
@@ -1,21 +1,17 @@
1
- import os
2
- os.system("pip uninstall -y gradio")
3
- os.system("pip install gradio --upgrade")
4
- import gradio as gr
5
  import pandas as pd
6
 
7
  def display_csv(file_path):
8
  # Load the CSV file using pandas
9
  df = pd.read_csv(file_path)
10
- # Convert the dataframe to HTML table
11
- html_table = df.to_html(index=False)
12
- return html_table
13
 
14
- # Hardcoded file path
15
- file_path = "merged-averaged-model_timings_2.1.0_12.1_NVIDIA_A10G_False.csv"
 
 
 
16
 
17
- # Call the display_csv function with the hardcoded file path
18
- html_table_output = display_csv(file_path)
19
-
20
- # Create the Gradio interface
21
- gr.Interface(fn=lambda: None, inputs=None, outputs=gr.outputs.HTML(html_table_output), title="CSV Viewer").launch()
 
1
+ import streamlit as st
 
 
 
2
  import pandas as pd
3
 
4
  def display_csv(file_path):
5
  # Load the CSV file using pandas
6
  df = pd.read_csv(file_path)
7
+ # Display the dataframe as a table
8
+ st.write(df)
 
9
 
10
+ def main():
11
+ # Hardcoded file path
12
+ file_path = "merged-averaged-model_timings_2.1.0_12.1_NVIDIA_A10G_False.csv"
13
+ # Call the display_csv function with the hardcoded file path
14
+ display_csv(file_path)
15
 
16
+ if __name__ == "__main__":
17
+ main()