zhangjf commited on
Commit
366a904
1 Parent(s): 540a99f

write the app.py and upload data

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -158,8 +158,8 @@ def display(access_key):
158
 
159
  messages = []
160
  for qa in qas:
161
- messages.append({"role":"user", "content":qas["q"]})
162
- messages.append({"role":"assistant", "content":qas["a"]})
163
  num_tokens_processed = num_tokens_from_messages(messages)
164
  num_tokens_total = num_tokens_processed * len(qs) / len(qas)
165
  dollars_tokens_processed = 0.002 * int(num_tokens_processed/1000)
 
158
 
159
  messages = []
160
  for qa in qas:
161
+ messages.append({"role":"user", "content":qa["q"]})
162
+ messages.append({"role":"assistant", "content":qa["a"]})
163
  num_tokens_processed = num_tokens_from_messages(messages)
164
  num_tokens_total = num_tokens_processed * len(qs) / len(qas)
165
  dollars_tokens_processed = 0.002 * int(num_tokens_processed/1000)