Spaces:
Sleeping
Sleeping
Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import streamlit as st
|
| 2 |
+
import pandas as pd
|
| 3 |
+
|
| 4 |
+
# Title of the app
|
| 5 |
+
st.title('OpenCLIP Model Results Viewer')
|
| 6 |
+
|
| 7 |
+
# Displaying the specific CSV file if it exists in the app directory
|
| 8 |
+
csv_file_path = 'openclip_results.csv'
|
| 9 |
+
|
| 10 |
+
try:
|
| 11 |
+
df = pd.read_csv(csv_file_path)
|
| 12 |
+
|
| 13 |
+
# Display the dataframe
|
| 14 |
+
st.write("### OpenCLIP Model Results")
|
| 15 |
+
st.dataframe(df)
|
| 16 |
+
|
| 17 |
+
# # Optionally, you could add some visualizations or summaries
|
| 18 |
+
# st.write("### Summary Statistics")
|
| 19 |
+
# st.write(df.describe())
|
| 20 |
+
|
| 21 |
+
# # If you want to create any specific plots
|
| 22 |
+
# if st.checkbox("Show Plot"):
|
| 23 |
+
# st.line_chart(df)
|
| 24 |
+
except FileNotFoundError:
|
| 25 |
+
st.error(f"File {csv_file_path} not found. Please ensure the file exists in the app directory.")
|