tsereno commited on
Commit
2105fb2
1 Parent(s): d7286ec

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +32 -82
app.py CHANGED
@@ -192,38 +192,6 @@ bot_inputs = [
192
  chatbot_component
193
  ]
194
 
195
- examples_list = gr.Examples(
196
- fn=bot,
197
- inputs=bot_inputs,
198
- outputs=[chatbot_component],
199
- examples=
200
- [
201
- [
202
- google_key_component,
203
- "gemini-1.5-flash-latest",
204
- "./example1.webp",
205
- .4,
206
- 1024,
207
- "",
208
- 32,
209
- 1,
210
- [("", "What is it?")]
211
- ],
212
- [
213
- google_key_component,
214
- "gemini-1.5-flash-latest",
215
- "./example2.jpg",
216
- .4,
217
- 1024,
218
- "",
219
- 32,
220
- 1,
221
- [("", "What is it?")]
222
- ]
223
- ],
224
- #cache_examples="lazy",
225
- )
226
-
227
  with gr.Blocks() as demo:
228
  gr.HTML(TITLE)
229
  gr.HTML(SUBTITLE)
@@ -248,31 +216,6 @@ with gr.Blocks() as demo:
248
  fn=user,
249
  inputs=user_inputs,
250
  outputs=[text_prompt_component, chatbot_component],
251
- examples=
252
- [
253
- [
254
- google_key_component,
255
- "gemini-1.5-flash-latest",
256
- "./example1.webp",
257
- .4,
258
- 1024,
259
- "",
260
- 32,
261
- 1,
262
- [("", "What is it?")]
263
- ],
264
- [
265
- google_key_component,
266
- "gemini-1.5-flash-latest",
267
- "./example2.jpg",
268
- .4,
269
- 1024,
270
- "",
271
- 32,
272
- 1,
273
- [("", "What is it?")]
274
- ]
275
- ],
276
  queue=False
277
  ).then(
278
  fn=bot, inputs=bot_inputs, outputs=[chatbot_component]
@@ -282,35 +225,42 @@ with gr.Blocks() as demo:
282
  fn=user,
283
  inputs=user_inputs,
284
  outputs=[text_prompt_component, chatbot_component],
285
- examples=
286
- [
287
- [
288
- google_key_component,
289
- "gemini-1.5-flash-latest",
290
- "./example1.webp",
291
- .4,
292
- 1024,
293
- "",
294
- 32,
295
- 1,
296
- [("", "What is it?")]
297
- ],
298
- [
299
- google_key_component,
300
- "gemini-1.5-flash-latest",
301
- "./example2.jpg",
302
- .4,
303
- 1024,
304
- "",
305
- 32,
306
- 1,
307
- [("", "What is it?")]
308
- ]
309
- ],
310
  queue=False
311
  ).then(
312
  fn=bot, inputs=bot_inputs, outputs=[chatbot_component]
313
  )
314
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
315
  demo.queue(max_size=99).launch(debug=False, show_error=True)
316
 
 
192
  chatbot_component
193
  ]
194
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
195
  with gr.Blocks() as demo:
196
  gr.HTML(TITLE)
197
  gr.HTML(SUBTITLE)
 
216
  fn=user,
217
  inputs=user_inputs,
218
  outputs=[text_prompt_component, chatbot_component],
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
219
  queue=False
220
  ).then(
221
  fn=bot, inputs=bot_inputs, outputs=[chatbot_component]
 
225
  fn=user,
226
  inputs=user_inputs,
227
  outputs=[text_prompt_component, chatbot_component],
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
228
  queue=False
229
  ).then(
230
  fn=bot, inputs=bot_inputs, outputs=[chatbot_component]
231
  )
232
 
233
+ gr.Examples(
234
+ fn=bot,
235
+ inputs=bot_inputs,
236
+ outputs=[chatbot_component],
237
+ examples=
238
+ [
239
+ [
240
+ google_key_component,
241
+ "gemini-1.5-flash-latest",
242
+ "./example1.webp",
243
+ .4,
244
+ 1024,
245
+ "",
246
+ 32,
247
+ 1,
248
+ [("", "What is it?")]
249
+ ],
250
+ [
251
+ google_key_component,
252
+ "gemini-1.5-flash-latest",
253
+ "./example2.jpg",
254
+ .4,
255
+ 1024,
256
+ "",
257
+ 32,
258
+ 1,
259
+ [("", "What is it?")]
260
+ ]
261
+ ],
262
+ #cache_examples="lazy",
263
+ )
264
+
265
  demo.queue(max_size=99).launch(debug=False, show_error=True)
266