rmdhirr commited on
Commit
2c9a88a
·
verified ·
1 Parent(s): fda6d82

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -18
app.py CHANGED
@@ -202,37 +202,37 @@ def run(message: dict, history: list[dict], system_prompt: str = "", max_new_tok
202
  examples = [
203
  [
204
  {
205
- "text": "I need to be in Japan for 10 days, going to Tokyo, Kyoto and Osaka. Think about number of attractions in each of them and allocate number of days to each city. Make public transport recommendations.",
206
  "files": [],
207
  }
208
  ],
209
  [
210
  {
211
- "text": "Write the matplotlib code to generate the same bar chart.",
212
  "files": ["assets/additional-examples/barchart.png"],
213
  }
214
  ],
215
  [
216
  {
217
- "text": "What is odd about this video?",
218
  "files": ["assets/additional-examples/tmp.mp4"],
219
  }
220
  ],
221
  [
222
  {
223
- "text": "I already have this supplement <image> and I want to buy this one <image>. Any warnings I should know about?",
224
  "files": ["assets/additional-examples/pill1.png", "assets/additional-examples/pill2.png"],
225
  }
226
  ],
227
  [
228
  {
229
- "text": "Write a poem inspired by the visual elements of the images.",
230
  "files": ["assets/sample-images/06-1.png", "assets/sample-images/06-2.png"],
231
  }
232
  ],
233
  [
234
  {
235
- "text": "Compose a short musical piece inspired by the visual elements of the images.",
236
  "files": [
237
  "assets/sample-images/07-1.png",
238
  "assets/sample-images/07-2.png",
@@ -243,13 +243,13 @@ examples = [
243
  ],
244
  [
245
  {
246
- "text": "Write a short story about what might have happened in this house.",
247
  "files": ["assets/sample-images/08.png"],
248
  }
249
  ],
250
  [
251
  {
252
- "text": "Create a short story based on the sequence of images.",
253
  "files": [
254
  "assets/sample-images/09-1.png",
255
  "assets/sample-images/09-2.png",
@@ -261,66 +261,67 @@ examples = [
261
  ],
262
  [
263
  {
264
- "text": "Describe the creatures that would live in this world.",
265
  "files": ["assets/sample-images/10.png"],
266
  }
267
  ],
268
  [
269
  {
270
- "text": "Read text in the image.",
271
  "files": ["assets/additional-examples/1.png"],
272
  }
273
  ],
274
  [
275
  {
276
- "text": "When is this ticket dated and how much did it cost?",
277
  "files": ["assets/additional-examples/2.png"],
278
  }
279
  ],
280
  [
281
  {
282
- "text": "Read the text in the image into markdown.",
283
  "files": ["assets/additional-examples/3.png"],
284
  }
285
  ],
286
  [
287
  {
288
- "text": "Evaluate this integral.",
289
  "files": ["assets/additional-examples/4.png"],
290
  }
291
  ],
292
  [
293
  {
294
- "text": "caption this image",
295
  "files": ["assets/sample-images/01.png"],
296
  }
297
  ],
298
  [
299
  {
300
- "text": "What's the sign says?",
301
  "files": ["assets/sample-images/02.png"],
302
  }
303
  ],
304
  [
305
  {
306
- "text": "Compare and contrast the two images.",
307
  "files": ["assets/sample-images/03.png"],
308
  }
309
  ],
310
  [
311
  {
312
- "text": "List all the objects in the image and their colors.",
313
  "files": ["assets/sample-images/04.png"],
314
  }
315
  ],
316
  [
317
  {
318
- "text": "Describe the atmosphere of the scene.",
319
  "files": ["assets/sample-images/05.png"],
320
  }
321
  ],
322
  ]
323
 
 
324
  DESCRIPTION = """\
325
  <img src='https://huggingface.co/spaces/huggingface-projects/gemma-3-12b-it/resolve/main/assets/logo.png' id='logo' />
326
  This is a demo of Kenanga 12B IT DPO, a multimodal Large Vision-Language Model (LVLM) adapted for Sundanese and Javanese support.
 
202
  examples = [
203
  [
204
  {
205
+ "text": "Abdi kudu di Jepang salila 10 poé, ka Tokyo, Kyoto, jeung Osaka. Pikirkeun sabaraha objek wisata di unggal kota teras bagi sabaraha poé keur tiap kota. Jieun rekomendasi transportasi umum.",
206
  "files": [],
207
  }
208
  ],
209
  [
210
  {
211
+ "text": "Tulisna kode matplotlib kanggo ngasilake diagram batang sing padha.",
212
  "files": ["assets/additional-examples/barchart.png"],
213
  }
214
  ],
215
  [
216
  {
217
+ "text": "Naon anu anéh tina pidéo ieu?",
218
  "files": ["assets/additional-examples/tmp.mp4"],
219
  }
220
  ],
221
  [
222
  {
223
+ "text": "Aku wis duwe suplemen iki <image> lan pengin tuku sing iki <image>. Ana peringatan apa sing kudu dakkerteni?",
224
  "files": ["assets/additional-examples/pill1.png", "assets/additional-examples/pill2.png"],
225
  }
226
  ],
227
  [
228
  {
229
+ "text": "Tulis sajak anu diilhamkeun ku unsur visual tina gambar-gambar.",
230
  "files": ["assets/sample-images/06-1.png", "assets/sample-images/06-2.png"],
231
  }
232
  ],
233
  [
234
  {
235
+ "text": "Gawéna gending cendhak sing ka-inspirasi saka unsur visual ing gambar-gambar.",
236
  "files": [
237
  "assets/sample-images/07-1.png",
238
  "assets/sample-images/07-2.png",
 
243
  ],
244
  [
245
  {
246
+ "text": "Tulis carita pondok ngeunaan naon anu tiasa kajadian di ieu imah.",
247
  "files": ["assets/sample-images/08.png"],
248
  }
249
  ],
250
  [
251
  {
252
+ "text": "Gawe crita cekak adhedhasar urutan gambar.",
253
  "files": [
254
  "assets/sample-images/09-1.png",
255
  "assets/sample-images/09-2.png",
 
261
  ],
262
  [
263
  {
264
+ "text": "Gambarkeun mahluk-mahluk anu bakal hirup di dunya ieu.",
265
  "files": ["assets/sample-images/10.png"],
266
  }
267
  ],
268
  [
269
  {
270
+ "text": "Waca teks sing ana ing gambar.",
271
  "files": ["assets/additional-examples/1.png"],
272
  }
273
  ],
274
  [
275
  {
276
+ "text": "Ieu tikét tanggal sabaraha jeung sabaraha hargana?",
277
  "files": ["assets/additional-examples/2.png"],
278
  }
279
  ],
280
  [
281
  {
282
+ "text": "Wacanen teks ing gambar lan tulisen ing format markdown.",
283
  "files": ["assets/additional-examples/3.png"],
284
  }
285
  ],
286
  [
287
  {
288
+ "text": "Itung nilai integral ieu.",
289
  "files": ["assets/additional-examples/4.png"],
290
  }
291
  ],
292
  [
293
  {
294
+ "text": "gawea caption kanggo gambar iki",
295
  "files": ["assets/sample-images/01.png"],
296
  }
297
  ],
298
  [
299
  {
300
+ "text": "Tanda éta nyebut naon?",
301
  "files": ["assets/sample-images/02.png"],
302
  }
303
  ],
304
  [
305
  {
306
+ "text": "Bandhingna lan bedakake loro gambar kasebut.",
307
  "files": ["assets/sample-images/03.png"],
308
  }
309
  ],
310
  [
311
  {
312
+ "text": "Daptarkeun sakabéh obyék dina gambar sarta warnana.",
313
  "files": ["assets/sample-images/04.png"],
314
  }
315
  ],
316
  [
317
  {
318
+ "text": "Jlentrehna suasana adegan kasebut.",
319
  "files": ["assets/sample-images/05.png"],
320
  }
321
  ],
322
  ]
323
 
324
+
325
  DESCRIPTION = """\
326
  <img src='https://huggingface.co/spaces/huggingface-projects/gemma-3-12b-it/resolve/main/assets/logo.png' id='logo' />
327
  This is a demo of Kenanga 12B IT DPO, a multimodal Large Vision-Language Model (LVLM) adapted for Sundanese and Javanese support.