Spaces:
Runtime error
Runtime error
Update style
Browse files
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}:
|
|
|
|
| 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}:
|
|
|
|
| 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 |
|