hlydecker commited on
Commit
6a4f556
1 Parent(s): bf2aeff

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -11,10 +11,10 @@ def load_data():
11
  df = load_data()
12
 
13
  # Calculate example cost
14
- def calculate_example_cost(input_text, output_text):
15
  input_tokens = len(input_text) / 5
16
  output_tokens = len(output_text) / 5
17
- example_cost = (input_tokens) + (output_tokens)
18
  return example_cost
19
 
20
  # Sidebar inputs
 
11
  df = load_data()
12
 
13
  # Calculate example cost
14
+ def calculate_example_cost(input_text, output_text, input_ratio=0.000001, output_ratio=0.000001):
15
  input_tokens = len(input_text) / 5
16
  output_tokens = len(output_text) / 5
17
+ example_cost = (input_tokens * input_ratio) + (output_tokens * output_ratio)
18
  return example_cost
19
 
20
  # Sidebar inputs