Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,21 +1,17 @@
|
|
1 |
-
import
|
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 |
-
#
|
11 |
-
|
12 |
-
return html_table
|
13 |
|
14 |
-
|
15 |
-
|
|
|
|
|
|
|
16 |
|
17 |
-
|
18 |
-
|
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()
|
|
|
|
|
|