Spaces:
Sleeping
Sleeping
Elijahbodden
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -65,6 +65,8 @@ def respond(
|
|
65 |
temperature,
|
66 |
mirostat_tau,
|
67 |
mirostat_eta,
|
|
|
|
|
68 |
):
|
69 |
preset = "none"
|
70 |
|
@@ -89,7 +91,9 @@ def respond(
|
|
89 |
mirostat_mode=1,
|
90 |
mirostat_tau=mirostat_tau,
|
91 |
mirostat_eta=mirostat_eta,
|
92 |
-
max_tokens=128
|
|
|
|
|
93 |
):
|
94 |
token = message["choices"][0]["text"]
|
95 |
|
@@ -122,6 +126,20 @@ demo = gr.ChatInterface(
|
|
122 |
step=0.01,
|
123 |
label="Mirostat eta",
|
124 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
125 |
],
|
126 |
)
|
127 |
|
|
|
65 |
temperature,
|
66 |
mirostat_tau,
|
67 |
mirostat_eta,
|
68 |
+
frequency_penalty,
|
69 |
+
presence_penalty
|
70 |
):
|
71 |
preset = "none"
|
72 |
|
|
|
91 |
mirostat_mode=1,
|
92 |
mirostat_tau=mirostat_tau,
|
93 |
mirostat_eta=mirostat_eta,
|
94 |
+
max_tokens=128,
|
95 |
+
frequency_penalty=frequency_penalty,
|
96 |
+
presence_penalty=presence_penalty,
|
97 |
):
|
98 |
token = message["choices"][0]["text"]
|
99 |
|
|
|
126 |
step=0.01,
|
127 |
label="Mirostat eta",
|
128 |
),
|
129 |
+
gr.Slider(
|
130 |
+
minimum=0.0,
|
131 |
+
maximum=1.0,
|
132 |
+
value=0.1,
|
133 |
+
step=0.01,
|
134 |
+
label="Frequency penalty",
|
135 |
+
),
|
136 |
+
gr.Slider(
|
137 |
+
minimum=0.0,
|
138 |
+
maximum=1.0,
|
139 |
+
value=0.1,
|
140 |
+
step=0.01,
|
141 |
+
label="Presence penalty",
|
142 |
+
),
|
143 |
],
|
144 |
)
|
145 |
|