minor updates in application
Browse files
app.py
CHANGED
|
@@ -32,24 +32,30 @@ with st.sidebar:
|
|
| 32 |
options=np.arange(0, 37, 1, dtype=int), value=13)
|
| 33 |
|
| 34 |
no_of_users = st.select_slider("No. of users",
|
| 35 |
-
options=np.arange(
|
| 36 |
|
| 37 |
st.subheader("One-Time Development Cost (Custom App)", divider="gray")
|
| 38 |
development_cost = st.select_slider("Development Cost for Custom App ($)",
|
| 39 |
-
options=np.arange(3000,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
|
| 41 |
# Fixed parameters
|
| 42 |
plan_limits = {"Plus": {"GPT-4o": 640, "GPT4": 320, "price": 20}, # 40 messages/3hrs
|
| 43 |
"Team": {"GPT-4o": 1600, "GPT4": 800, "price": 30}} # 100 messages/3hrs, minimum 2 users price 25 pm if billed annually
|
| 44 |
|
| 45 |
-
|
| 46 |
|
| 47 |
# Timeline
|
| 48 |
x = np.arange(0, max_months, dtype=int) # in months timeline
|
| 49 |
|
| 50 |
# Accumulated cost for ChatGPT-4o API
|
| 51 |
-
api_price_per_month = x * (
|
| 52 |
-
|
| 53 |
|
| 54 |
# Accumulated cost for ChatGPT Team
|
| 55 |
team_price_per_month = x * no_of_users * plan_limits["Plus"]["price"]
|
|
|
|
| 32 |
options=np.arange(0, 37, 1, dtype=int), value=13)
|
| 33 |
|
| 34 |
no_of_users = st.select_slider("No. of users",
|
| 35 |
+
options=np.arange(10, 501, 1, dtype=int), value=30)
|
| 36 |
|
| 37 |
st.subheader("One-Time Development Cost (Custom App)", divider="gray")
|
| 38 |
development_cost = st.select_slider("Development Cost for Custom App ($)",
|
| 39 |
+
options=np.arange(3000, 20001, 100, dtype=int), value=3000)
|
| 40 |
+
st.subheader("Token Usage", divider="gray")
|
| 41 |
+
input_tokens_per_month = st.slider("Input Tokens per user (Monthly)",
|
| 42 |
+
min_value=10000, max_value=500000, step=10000, value=85000)
|
| 43 |
+
|
| 44 |
+
output_tokens_per_month = st.slider("Output Tokens per user (Monthly)",
|
| 45 |
+
min_value=10000, max_value=500000, step=10000, value=85000)
|
| 46 |
|
| 47 |
# Fixed parameters
|
| 48 |
plan_limits = {"Plus": {"GPT-4o": 640, "GPT4": 320, "price": 20}, # 40 messages/3hrs
|
| 49 |
"Team": {"GPT-4o": 1600, "GPT4": 800, "price": 30}} # 100 messages/3hrs, minimum 2 users price 25 pm if billed annually
|
| 50 |
|
| 51 |
+
api_price = {"GPT-4o": {"input": 0.0100, "output": 0.0300}, "GPT4": {"input": 0.0100, "output": 0.0300}} #usd per 1K tokens
|
| 52 |
|
| 53 |
# Timeline
|
| 54 |
x = np.arange(0, max_months, dtype=int) # in months timeline
|
| 55 |
|
| 56 |
# Accumulated cost for ChatGPT-4o API
|
| 57 |
+
api_price_per_month = x * (api_price["GPT4"]["input"] * input_tokens_per_month *0.001 +
|
| 58 |
+
api_price["GPT4"]["output"] * output_tokens_per_month*0.001) * no_of_users
|
| 59 |
|
| 60 |
# Accumulated cost for ChatGPT Team
|
| 61 |
team_price_per_month = x * no_of_users * plan_limits["Plus"]["price"]
|