ashwinR commited on
Commit
254ee85
·
1 Parent(s): b606397

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -39,10 +39,11 @@ if source == 'I want to input some text':
39
  time.sleep(2)
40
  st.markdown('___')
41
  prompt=f"Explain this code. Lets think Step by step. : {input_su}"
 
42
  for token in theb.Completion.create(prompt):
43
- print(token, end='', flush=True)
44
  st.write('Results!')
45
- st.write(response.text)
46
  stars = st_star_rating("How satisfied are you with the response?", 5, 0, 40)
47
  st.balloons()
48
  if source == 'I want to upload a file':
 
39
  time.sleep(2)
40
  st.markdown('___')
41
  prompt=f"Explain this code. Lets think Step by step. : {input_su}"
42
+ response = []
43
  for token in theb.Completion.create(prompt):
44
+ response.append(print(token, end='', flush=True))
45
  st.write('Results!')
46
+ st.write("".join(response))
47
  stars = st_star_rating("How satisfied are you with the response?", 5, 0, 40)
48
  st.balloons()
49
  if source == 'I want to upload a file':