Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -3,7 +3,7 @@ import pandas as pd
|
|
3 |
import matplotlib.pyplot as plt
|
4 |
|
5 |
# Load the data from the CSV file
|
6 |
-
@st.
|
7 |
def load_data():
|
8 |
df = pd.read_csv("llm_data.csv") # Update with your CSV file path
|
9 |
return df
|
@@ -27,7 +27,7 @@ df['Example cost'] = df.apply(lambda row: calculate_example_cost(input_text, out
|
|
27 |
# Display sorted LLM costs
|
28 |
st.write("Sorted LLM Costs:")
|
29 |
sorted_df = df.sort_values(by='Example cost', ascending=False)
|
30 |
-
st.write(sorted_df[['Company', 'Model', 'Example cost']])
|
31 |
|
32 |
# Plot visualization
|
33 |
st.write("Visualization of LLM Costs:")
|
|
|
3 |
import matplotlib.pyplot as plt
|
4 |
|
5 |
# Load the data from the CSV file
|
6 |
+
@st.cache_data
|
7 |
def load_data():
|
8 |
df = pd.read_csv("llm_data.csv") # Update with your CSV file path
|
9 |
return df
|
|
|
27 |
# Display sorted LLM costs
|
28 |
st.write("Sorted LLM Costs:")
|
29 |
sorted_df = df.sort_values(by='Example cost', ascending=False)
|
30 |
+
st.write(sorted_df[['Company', 'Model', 'Example cost ($USD)']])
|
31 |
|
32 |
# Plot visualization
|
33 |
st.write("Visualization of LLM Costs:")
|