Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -159,9 +159,9 @@ def set_custom_model_from_radio(selected):
|
|
159 |
return selected
|
160 |
|
161 |
# IMPORTANT: Because we have 1 main user input + 7 additional inputs,
|
162 |
-
# each example should be an 8-item list [user_text, system_prompt, max_tokens,
|
163 |
-
# top_p, frequency_penalty, seed, custom_model].
|
164 |
-
|
165 |
demo = gr.ChatInterface(
|
166 |
fn=respond,
|
167 |
additional_inputs=[
|
@@ -176,28 +176,43 @@ demo = gr.ChatInterface(
|
|
176 |
fill_height=True,
|
177 |
chatbot=chatbot,
|
178 |
theme="Nymbo/Nymbo_Theme",
|
179 |
-
)
|
180 |
-
print("ChatInterface object created.")
|
181 |
-
|
182 |
-
# Add examples to the interface
|
183 |
-
demo.add_examples(
|
184 |
examples=[
|
185 |
-
|
186 |
-
[
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
198 |
],
|
199 |
)
|
200 |
-
print("
|
201 |
|
202 |
with demo:
|
203 |
with gr.Accordion("Featured Models", open=False):
|
|
|
159 |
return selected
|
160 |
|
161 |
# IMPORTANT: Because we have 1 main user input + 7 additional inputs,
|
162 |
+
# each example should be an 8-item list: [user_text, system_prompt, max_tokens,
|
163 |
+
# temperature, top_p, frequency_penalty, seed, custom_model].
|
164 |
+
|
165 |
demo = gr.ChatInterface(
|
166 |
fn=respond,
|
167 |
additional_inputs=[
|
|
|
176 |
fill_height=True,
|
177 |
chatbot=chatbot,
|
178 |
theme="Nymbo/Nymbo_Theme",
|
|
|
|
|
|
|
|
|
|
|
179 |
examples=[
|
180 |
+
# Example 1
|
181 |
+
[
|
182 |
+
"Howdy, partner!", # user_text
|
183 |
+
"", # system_prompt
|
184 |
+
512, # max_tokens
|
185 |
+
0.7, # temperature
|
186 |
+
0.95, # top_p
|
187 |
+
0.0, # frequency_penalty
|
188 |
+
-1, # seed
|
189 |
+
"" # custom_model
|
190 |
+
],
|
191 |
+
# Example 2
|
192 |
+
[
|
193 |
+
"What's your model name and who trained you?",
|
194 |
+
"",
|
195 |
+
512,
|
196 |
+
0.7,
|
197 |
+
0.95,
|
198 |
+
0.0,
|
199 |
+
-1,
|
200 |
+
""
|
201 |
+
],
|
202 |
+
# Example 3
|
203 |
+
[
|
204 |
+
"How many R's are there in 'Strawberry'?",
|
205 |
+
"",
|
206 |
+
512,
|
207 |
+
0.7,
|
208 |
+
0.95,
|
209 |
+
0.0,
|
210 |
+
-1,
|
211 |
+
""
|
212 |
+
],
|
213 |
],
|
214 |
)
|
215 |
+
print("ChatInterface object created.")
|
216 |
|
217 |
with demo:
|
218 |
with gr.Accordion("Featured Models", open=False):
|