art9 commited on
Commit
fa33852
·
1 Parent(s): f440b23

Update style

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -17,7 +17,8 @@ def completion(model_engine, prompt, max_tokens, temperature, top_p, top_k, n, s
17
  )
18
  for idx, choice in enumerate(answer['choices']):
19
  text = choice['text']
20
- st.success(f'生成结果#{idx}: {text}')
 
21
  st.json(answer, expanded=False)
22
 
23
  elif model_engine == "WeLM":
@@ -44,7 +45,8 @@ def completion(model_engine, prompt, max_tokens, temperature, top_p, top_k, n, s
44
  if len(text) == 0:
45
  st.info(f'生成结果#{idx}: 结果为空,可能的原因:生成的第一个字符为stop字符,请合理配置prompt或stop')
46
  else:
47
- st.success(f'生成结果#{idx}: {text}')
 
48
  st.json(answer, expanded=False)
49
 
50
 
 
17
  )
18
  for idx, choice in enumerate(answer['choices']):
19
  text = choice['text']
20
+ st.success(f'生成结果#{idx}: ')
21
+ st.write(text)
22
  st.json(answer, expanded=False)
23
 
24
  elif model_engine == "WeLM":
 
45
  if len(text) == 0:
46
  st.info(f'生成结果#{idx}: 结果为空,可能的原因:生成的第一个字符为stop字符,请合理配置prompt或stop')
47
  else:
48
+ st.success(f'生成结果#{idx}: ')
49
+ st.write(text)
50
  st.json(answer, expanded=False)
51
 
52