Manofem commited on
Commit
746c162
·
1 Parent(s): ea3442d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -15,7 +15,7 @@ def generate_output_stream(prompt):
15
  chunk = next(output_stream)
16
  if chunk.get('choices') and chunk['choices'][0].get('text'):
17
  text = chunk['choices'][0]['text']
18
- yield text.encode('utf-8')
19
  time.sleep(0.01) # Adjust the delay if needed
20
  except StopIteration:
21
  break
 
15
  chunk = next(output_stream)
16
  if chunk.get('choices') and chunk['choices'][0].get('text'):
17
  text = chunk['choices'][0]['text']
18
+ yield f"{text}\n"
19
  time.sleep(0.01) # Adjust the delay if needed
20
  except StopIteration:
21
  break