Skip to content

Commit

Permalink
Rebase and fix streaming
Browse files Browse the repository at this point in the history
  • Loading branch information
mgoin committed Oct 11, 2023
1 parent 9886574 commit 8c2e74f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/deepsparse/transformers/inference/infer.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,10 @@ def _display_generation_speed(prompt_sequence_length, pipeline):
def _display_bot_response(stream: bool, response):
# print response from pipeline, streaming or not

print("Bot:", end="")
print("Bot:", end="", flush=True)
if stream:
for generation in response:
print(generation.generations[0].text, end="")
print(generation.generations[0].text, end="", flush=True)
print()
else:
print(response.generations[0].text)
Expand Down

0 comments on commit 8c2e74f

Please sign in to comment.