Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -24,6 +24,9 @@ output_text = st.sidebar.text_area("Output text")
|
|
| 24 |
# Calculate example cost for each row
|
| 25 |
df['Example cost'] = df.apply(lambda row: calculate_example_cost(input_text, output_text, row['Input']/1000000, row['Output']/1000000), axis=1)
|
| 26 |
|
|
|
|
|
|
|
|
|
|
| 27 |
# Display sorted LLM costs
|
| 28 |
st.write("Sorted LLM Costs:")
|
| 29 |
sorted_df = df.sort_values(by='Example cost', ascending=False)
|
|
|
|
| 24 |
# Calculate example cost for each row
|
| 25 |
df['Example cost'] = df.apply(lambda row: calculate_example_cost(input_text, output_text, row['Input']/1000000, row['Output']/1000000), axis=1)
|
| 26 |
|
| 27 |
+
st.title("LLM Cost Calculator")
|
| 28 |
+
st.write("Use this tool to compare LLM usage costs between different LLM APIs")
|
| 29 |
+
|
| 30 |
# Display sorted LLM costs
|
| 31 |
st.write("Sorted LLM Costs:")
|
| 32 |
sorted_df = df.sort_values(by='Example cost', ascending=False)
|