pragneshbarik commited on
Commit
be398c6
·
1 Parent(s): b3f1ffe

made some changes

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -406,8 +406,8 @@ def stream_handler(chat_stream, placeholder):
406
  full_response = ""
407
 
408
  for chunk in chat_stream:
409
- if chunk.token["text"] != "</s>":
410
- full_response += chunk.token["text"]
411
  placeholder.markdown(full_response + "▌")
412
  placeholder.markdown(full_response)
413
 
@@ -426,7 +426,7 @@ def stream_handler(chat_stream, placeholder):
426
 
427
  with col3:
428
  st.write(
429
- f"**₹ {round(len_response * COST_PER_1000_TOKENS_INR / 1000, 5)} cost incurred**"
430
  )
431
 
432
  st.session_state["tps"] = tokens_per_second
 
406
  full_response = ""
407
 
408
  for chunk in chat_stream:
409
+ if chunk.token.text != "</s>":
410
+ full_response += chunk.token.text
411
  placeholder.markdown(full_response + "▌")
412
  placeholder.markdown(full_response)
413
 
 
426
 
427
  with col3:
428
  st.write(
429
+ f"**$ {round(len_response * COST_PER_1000_TOKENS_INR * 82 / 1000, 5)} cost incurred**"
430
  )
431
 
432
  st.session_state["tps"] = tokens_per_second