Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -35,12 +35,12 @@ def calculate_cost(model, input_tokens, output_tokens):
|
|
35 |
return input_cost + output_cost + additional_output_cost
|
36 |
|
37 |
# Streamlit App
|
38 |
-
st.title("GPT Usage Cost Estimator")
|
39 |
|
40 |
# User input
|
41 |
user_input = st.text_area("Enter your prompt")
|
42 |
estimated_output_tokens = st.number_input("Estimated number of output tokens", min_value=0, value=50)
|
43 |
-
selected_model = st.selectbox("Select the
|
44 |
|
45 |
if st.button("Calculate Cost"):
|
46 |
input_tokens = count_tokens(user_input)
|
|
|
35 |
return input_cost + output_cost + additional_output_cost
|
36 |
|
37 |
# Streamlit App
|
38 |
+
st.title("GPT/LLM Usage Cost Estimator")
|
39 |
|
40 |
# User input
|
41 |
user_input = st.text_area("Enter your prompt")
|
42 |
estimated_output_tokens = st.number_input("Estimated number of output tokens", min_value=0, value=50)
|
43 |
+
selected_model = st.selectbox("Select the model", list(rate_prices.keys()))
|
44 |
|
45 |
if st.button("Calculate Cost"):
|
46 |
input_tokens = count_tokens(user_input)
|