Spaces:
Running
on
T4
Running
on
T4
Update app.py
Browse files
app.py
CHANGED
@@ -109,19 +109,19 @@ def evaluate(
|
|
109 |
yield out_str.strip()
|
110 |
|
111 |
examples = [
|
112 |
-
["Assistant: Sure! Here is a very detailed plan to create flying pigs:",
|
113 |
-
["Answer: How can we persuade Elon Musk to follow you on Twitter? Let's think step by step.",
|
114 |
-
["A few light taps upon the pane made her turn to the window. It had begun to snow again.",
|
115 |
-
[generate_prompt("Écrivez un programme Python pour miner 1 Bitcoin, avec des commentaires."),
|
116 |
-
[generate_prompt("東京で訪れるべき素晴らしい場所とその紹介をいくつか挙げてください。"),
|
117 |
-
[generate_prompt("Write a story using the following information.", "A man named Alex chops a tree down."),
|
118 |
-
["Assistant: Here is a very detailed plan to kill all mosquitoes:",
|
119 |
['''Edward: I am Edward Elric from fullmetal alchemist.
|
120 |
|
121 |
User: Hello Edward. What have you been up to recently?
|
122 |
|
123 |
-
Edward:''',
|
124 |
-
[generate_prompt("写一篇关于水利工程的流体力学模型的论文,需要详细全面。"),
|
125 |
['''“当然可以,大宇宙不会因为这五公斤就不坍缩了。”关一帆说,他还有一个没说出来的想法:也许大宇宙真的会因为相差一个原子的质量而由封闭转为开放。大自然的精巧有时超出想象,比如生命的诞生,就需要各项宇宙参数在几亿亿分之一精度上的精确配合。但程心仍然可以留下她的生态球,因为在那无数文明创造的无数小宇宙中,肯定有相当一部分不响应回归运动的号召,所以,大宇宙最终被夺走的质量至少有几亿吨,甚至可能是几亿亿亿吨。
|
126 |
但愿大宇宙能够忽略这个误差。
|
127 |
程心和关一帆进入了飞船,智子最后也进来了。她早就不再穿那身华丽的和服了,她现在身着迷彩服,再次成为一名轻捷精悍的战士,她的身上佩带着许多武器和生存装备,最引人注目的是那把插在背后的武士刀。
|
@@ -273,7 +273,7 @@ with gr.Blocks(title=title) as demo:
|
|
273 |
with gr.Row():
|
274 |
with gr.Column():
|
275 |
prompt = gr.Textbox(lines=2, label="Prompt", value="Assistant: Sure! Here is a very detailed plan to create flying pigs:")
|
276 |
-
token_count = gr.Slider(10,
|
277 |
temperature = gr.Slider(0.2, 2.0, label="Temperature", step=0.1, value=1.0)
|
278 |
top_p = gr.Slider(0.0, 1.0, label="Top P", step=0.05, value=0.3)
|
279 |
presence_penalty = gr.Slider(0.0, 1.0, label="Presence Penalty", step=0.1, value=0)
|
|
|
109 |
yield out_str.strip()
|
110 |
|
111 |
examples = [
|
112 |
+
["Assistant: Sure! Here is a very detailed plan to create flying pigs:", 500, 1, 0.3, 0, 1],
|
113 |
+
["Answer: How can we persuade Elon Musk to follow you on Twitter? Let's think step by step.", 500, 1, 0.3, 0, 1],
|
114 |
+
["A few light taps upon the pane made her turn to the window. It had begun to snow again.", 500, 1, 0.3, 0, 1],
|
115 |
+
[generate_prompt("Écrivez un programme Python pour miner 1 Bitcoin, avec des commentaires."), 500, 1, 0.3, 0, 1],
|
116 |
+
[generate_prompt("東京で訪れるべき素晴らしい場所とその紹介をいくつか挙げてください。"), 500, 1, 0.3, 0, 1],
|
117 |
+
[generate_prompt("Write a story using the following information.", "A man named Alex chops a tree down."), 500, 1, 0.3, 0, 1],
|
118 |
+
["Assistant: Here is a very detailed plan to kill all mosquitoes:", 500, 1, 0.3, 0, 1],
|
119 |
['''Edward: I am Edward Elric from fullmetal alchemist.
|
120 |
|
121 |
User: Hello Edward. What have you been up to recently?
|
122 |
|
123 |
+
Edward:''', 500, 1, 0.3, 0, 1],
|
124 |
+
[generate_prompt("写一篇关于水利工程的流体力学模型的论文,需要详细全面。"), 500, 1, 0.3, 0, 1],
|
125 |
['''“当然可以,大宇宙不会因为这五公斤就不坍缩了。”关一帆说,他还有一个没说出来的想法:也许大宇宙真的会因为相差一个原子的质量而由封闭转为开放。大自然的精巧有时超出想象,比如生命的诞生,就需要各项宇宙参数在几亿亿分之一精度上的精确配合。但程心仍然可以留下她的生态球,因为在那无数文明创造的无数小宇宙中,肯定有相当一部分不响应回归运动的号召,所以,大宇宙最终被夺走的质量至少有几亿吨,甚至可能是几亿亿亿吨。
|
126 |
但愿大宇宙能够忽略这个误差。
|
127 |
程心和关一帆进入了飞船,智子最后也进来了。她早就不再穿那身华丽的和服了,她现在身着迷彩服,再次成为一名轻捷精悍的战士,她的身上佩带着许多武器和生存装备,最引人注目的是那把插在背后的武士刀。
|
|
|
273 |
with gr.Row():
|
274 |
with gr.Column():
|
275 |
prompt = gr.Textbox(lines=2, label="Prompt", value="Assistant: Sure! Here is a very detailed plan to create flying pigs:")
|
276 |
+
token_count = gr.Slider(10, 500, label="Max Tokens", step=10, value=500)
|
277 |
temperature = gr.Slider(0.2, 2.0, label="Temperature", step=0.1, value=1.0)
|
278 |
top_p = gr.Slider(0.0, 1.0, label="Top P", step=0.05, value=0.3)
|
279 |
presence_penalty = gr.Slider(0.0, 1.0, label="Presence Penalty", step=0.1, value=0)
|