TornadoAI commited on
Commit
965f000
·
verified ·
1 Parent(s): 2dc42b7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -53,7 +53,7 @@ def predict(
53
  if 'choices' in json_response and len(json_response['choices']) > 0:
54
  assistant_content = json_response['choices'][0]['message']['content']
55
  chat_history.append({"role": "assistant", "content": assistant_content})
56
- stats_content = f"*Powered by Oxygen, Generation time: {json_response["usage"]["metrics"]["inference_time_ms"]} ms , Tokens per second: {json_response["usage"]["metrics"]["tokens_per_second"]} , Generation cost: {round(json_response["usage"]["cost"]["total"],10)} EUR*"
57
  else:
58
  chat_history.append({"role": "assistant", "content": "Error: No response from assistant."})
59
 
 
53
  if 'choices' in json_response and len(json_response['choices']) > 0:
54
  assistant_content = json_response['choices'][0]['message']['content']
55
  chat_history.append({"role": "assistant", "content": assistant_content})
56
+ stats_content = f'*Powered by Oxygen, Generation time: {json_response["usage"]["metrics"]["inference_time_ms"]} ms , Tokens per second: {json_response["usage"]["metrics"]["tokens_per_second"]} , Generation cost: {round(json_response["usage"]["cost"]["total"],10)} EUR*'
57
  else:
58
  chat_history.append({"role": "assistant", "content": "Error: No response from assistant."})
59