pragneshbarik commited on
Commit
ff7aff0
2 Parent(s): b89ec8f 77e76e3

Merge branch 'main' of https://huggingface.co/spaces/pragneshbarik/ebook-gen

Browse files
Files changed (1) hide show
  1. components/stream_handler.py +2 -2
components/stream_handler.py CHANGED
@@ -11,8 +11,8 @@ def stream_handler(session_state, chat_stream, prompt, placeholder):
11
  full_response = ""
12
 
13
  for chunk in chat_stream:
14
- if chunk.token["text"] != "</s>":
15
- full_response += chunk.token["text"]
16
  placeholder.markdown(full_response + "▌")
17
  placeholder.markdown(full_response)
18
 
 
11
  full_response = ""
12
 
13
  for chunk in chat_stream:
14
+ if chunk.token.text != "</s>":
15
+ full_response += chunk.token.text
16
  placeholder.markdown(full_response + "▌")
17
  placeholder.markdown(full_response)
18