Spaces:
Sleeping
Sleeping
rgreenberg1
commited on
Commit
•
55b009f
1
Parent(s):
b82bbf6
Update app.py
Browse files
app.py
CHANGED
@@ -59,51 +59,7 @@ with gr.Blocks() as demo:
|
|
59 |
"Claire makes a 3 egg omelet every morning for breakfast. How many dozens of eggs will she eat in 4 weeks?",
|
60 |
"Gretchen has 110 coins. There are 30 more gold coins than silver coins. How many gold coins does Gretchen have?",],inputs=[textbox],)
|
61 |
|
62 |
-
|
63 |
-
label="Max new tokens",
|
64 |
-
value=DEFAULT_MAX_NEW_TOKENS,
|
65 |
-
minimum=0,
|
66 |
-
maximum=MAX_MAX_NEW_TOKENS,
|
67 |
-
step=1,
|
68 |
-
interactive=True,
|
69 |
-
info="The maximum numbers of new tokens",)
|
70 |
-
temperature = gr.Slider(
|
71 |
-
label="Temperature",
|
72 |
-
value=0.3,
|
73 |
-
minimum=0.05,
|
74 |
-
maximum=1.0,
|
75 |
-
step=0.05,
|
76 |
-
interactive=True,
|
77 |
-
info="Higher values produce more diverse outputs",
|
78 |
-
)
|
79 |
-
top_p = gr.Slider(
|
80 |
-
label="Top-p (nucleus) sampling",
|
81 |
-
value=0.40,
|
82 |
-
minimum=0.0,
|
83 |
-
maximum=1,
|
84 |
-
step=0.05,
|
85 |
-
interactive=True,
|
86 |
-
info="Higher values sample more low-probability tokens",
|
87 |
-
)
|
88 |
-
top_k = gr.Slider(
|
89 |
-
label="Top-k sampling",
|
90 |
-
value=20,
|
91 |
-
minimum=1,
|
92 |
-
maximum=100,
|
93 |
-
step=1,
|
94 |
-
interactive=True,
|
95 |
-
info="Sample from the top_k most likely tokens",
|
96 |
-
)
|
97 |
-
repetition_penalty = gr.Slider(
|
98 |
-
label="Repetition penalty",
|
99 |
-
value=1.2,
|
100 |
-
minimum=1.0,
|
101 |
-
maximum=2.0,
|
102 |
-
step=0.05,
|
103 |
-
interactive=True,
|
104 |
-
info="Penalize repeated tokens",
|
105 |
-
)
|
106 |
-
|
107 |
# Generation inference
|
108 |
def generate(
|
109 |
message,
|
|
|
59 |
"Claire makes a 3 egg omelet every morning for breakfast. How many dozens of eggs will she eat in 4 weeks?",
|
60 |
"Gretchen has 110 coins. There are 30 more gold coins than silver coins. How many gold coins does Gretchen have?",],inputs=[textbox],)
|
61 |
|
62 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
# Generation inference
|
64 |
def generate(
|
65 |
message,
|