srush HF staff commited on
Commit
d6fa06f
1 Parent(s): c324ae4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -81,7 +81,7 @@ def start(prompt, board, api_key):
81
 
82
  # for content in contents:
83
  time.sleep(0.005)
84
- content = chunk["choices"][0].get("delta", {}).get("content")
85
  if content is not None:
86
  out += content
87
  print(content, end="")
 
81
 
82
  # for content in contents:
83
  time.sleep(0.005)
84
+ content = chunk.choices[0].delta.content or ""
85
  if content is not None:
86
  out += content
87
  print(content, end="")