seawolf2357 commited on
Commit
f89a031
ยท
verified ยท
1 Parent(s): 00dba49

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +115 -5
app.py CHANGED
@@ -328,23 +328,133 @@ def run(message: dict, history: list[dict], system_prompt: str = "", max_new_tok
328
  ##################################################
329
  # ์˜ˆ์‹œ๋“ค (๊ธฐ์กด)
330
  ##################################################
 
 
 
331
  examples = [
332
  [
333
  {
334
- "text": "Test with PDF",
335
- "files": ["assets/sample.pdf"],
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
336
  }
337
  ],
338
  [
339
  {
340
- "text": "Simple text with CSV upload.",
341
- "files": ["assets/sample.csv"],
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
342
  }
343
  ],
344
- # ...์›๋ž˜ ์˜ˆ์‹œ๋“ค ์œ ์ง€...
345
  ]
346
 
347
 
 
348
  demo = gr.ChatInterface(
349
  fn=run,
350
  type="messages",
 
328
  ##################################################
329
  # ์˜ˆ์‹œ๋“ค (๊ธฐ์กด)
330
  ##################################################
331
+ ##################################################
332
+ # ์˜ˆ์‹œ๋“ค (ํ•œ๊ธ€ํ™” ๋ฒ„์ „)
333
+ ##################################################
334
  examples = [
335
  [
336
  {
337
+ "text": "10์ผ ๋™์•ˆ ์ผ๋ณธ์— ๋จธ๋ฌด๋ฅด๋ฉด์„œ ๋„์ฟ„, ๊ตํ† , ์˜ค์‚ฌ์นด๋ฅผ ๋ฐฉ๋ฌธํ•˜๋ ค๊ณ  ํ•ฉ๋‹ˆ๋‹ค. ๊ฐ ๋„์‹œ๋ณ„ ๊ด€๊ด‘์ง€ ์ˆ˜๋ฅผ ๊ณ ๋ คํ•ด ๋ฉฐ์น ์”ฉ ํ• ๋‹นํ•˜๋ฉด ์ข‹์„์ง€, ๊ทธ๋ฆฌ๊ณ  ๋Œ€์ค‘๊ตํ†ต ์ด์šฉ์— ๋Œ€ํ•œ ์ถ”์ฒœ์„ ํ•ด์ฃผ์„ธ์š”.",
338
+ "files": [],
339
+ }
340
+ ],
341
+ [
342
+ {
343
+ "text": "๋™์ผํ•œ ๋ง‰๋Œ€ ๊ทธ๋ž˜ํ”„๋ฅผ ๊ทธ๋ฆฌ๋Š” matplotlib ์ฝ”๋“œ๋ฅผ ์ž‘์„ฑํ•ด์ฃผ์„ธ์š”.",
344
+ "files": ["assets/additional-examples/barchart.png"],
345
+ }
346
+ ],
347
+ [
348
+ {
349
+ "text": "์ด ์˜์ƒ์—์„œ ์ด์ƒํ•œ ์ ์ด ๋ฌด์—‡์ธ๊ฐ€์š”?",
350
+ "files": ["assets/additional-examples/tmp.mp4"],
351
+ }
352
+ ],
353
+ [
354
+ {
355
+ "text": "์ด๋ฏธ ์ด ์˜์–‘์ œ๋ฅผ <image> ๊ฐ€์ง€๊ณ  ์žˆ๊ณ , ์ด ์ œํ’ˆ <image>์„ ์ƒˆ๋กœ ์‚ฌ๋ ค ํ•ฉ๋‹ˆ๋‹ค. ํ•จ๊ป˜ ์„ญ์ทจํ•  ๋•Œ ์ฃผ์˜ํ•ด์•ผ ํ•  ์ ์ด ์žˆ์„๊นŒ์š”?",
356
+ "files": ["assets/additional-examples/pill1.png", "assets/additional-examples/pill2.png"],
357
+ }
358
+ ],
359
+ [
360
+ {
361
+ "text": "์ด๋ฏธ์ง€์˜ ์‹œ๊ฐ์  ์š”์†Œ์—์„œ ์˜๊ฐ์„ ๋ฐ›์•„ ์‹œ๋ฅผ ์ž‘์„ฑํ•ด์ฃผ์„ธ์š”.",
362
+ "files": ["assets/sample-images/06-1.png", "assets/sample-images/06-2.png"],
363
+ }
364
+ ],
365
+ [
366
+ {
367
+ "text": "์ด๋ฏธ์ง€์˜ ์‹œ๊ฐ์  ์š”์†Œ๋ฅผ ํ† ๋Œ€๋กœ ์งง์€ ์•…๊ณก์„ ์ž‘๊ณกํ•ด์ฃผ์„ธ์š”.",
368
+ "files": [
369
+ "assets/sample-images/07-1.png",
370
+ "assets/sample-images/07-2.png",
371
+ "assets/sample-images/07-3.png",
372
+ "assets/sample-images/07-4.png",
373
+ ],
374
+ }
375
+ ],
376
+ [
377
+ {
378
+ "text": "์ด ์ง‘์—์„œ ๋ฌด์Šจ ์ผ์ด ์žˆ์—ˆ์„์ง€ ์งง์€ ์ด์•ผ๊ธฐ๋ฅผ ์ง€์–ด๋ณด์„ธ์š”.",
379
+ "files": ["assets/sample-images/08.png"],
380
+ }
381
+ ],
382
+ [
383
+ {
384
+ "text": "์ด๋ฏธ์ง€๋“ค์˜ ์ˆœ์„œ๋ฅผ ๋ฐ”ํƒ•์œผ๋กœ ์งง์€ ์ด์•ผ๊ธฐ๋ฅผ ๋งŒ๋“ค์–ด ์ฃผ์„ธ์š”.",
385
+ "files": [
386
+ "assets/sample-images/09-1.png",
387
+ "assets/sample-images/09-2.png",
388
+ "assets/sample-images/09-3.png",
389
+ "assets/sample-images/09-4.png",
390
+ "assets/sample-images/09-5.png",
391
+ ],
392
+ }
393
+ ],
394
+ [
395
+ {
396
+ "text": "์ด ์„ธ๊ณ„์—์„œ ์‚ด๊ณ  ์žˆ์„ ์ƒ๋ฌผ๋“ค์„ ์ƒ์ƒํ•ด์„œ ๋ฌ˜์‚ฌํ•ด์ฃผ์„ธ์š”.",
397
+ "files": ["assets/sample-images/10.png"],
398
  }
399
  ],
400
  [
401
  {
402
+ "text": "์ด๋ฏธ์ง€์— ์ ํžŒ ํ…์ŠคํŠธ๋ฅผ ์ฝ์–ด์ฃผ์„ธ์š”.",
403
+ "files": ["assets/additional-examples/1.png"],
404
+ }
405
+ ],
406
+ [
407
+ {
408
+ "text": "์ด ํ‹ฐ์ผ“์€ ์–ธ์ œ ๋ฐœ๊ธ‰๋œ ๊ฒƒ์ด๊ณ , ๊ฐ€๊ฒฉ์€ ์–ผ๋งˆ์ธ๊ฐ€์š”?",
409
+ "files": ["assets/additional-examples/2.png"],
410
+ }
411
+ ],
412
+ [
413
+ {
414
+ "text": "์ด๋ฏธ์ง€์— ์žˆ๋Š” ํ…์ŠคํŠธ๋ฅผ ๊ทธ๋Œ€๋กœ ์ฝ์–ด์„œ ๋งˆํฌ๋‹ค์šด ํ˜•ํƒœ๋กœ ์ ์–ด์ฃผ์„ธ์š”.",
415
+ "files": ["assets/additional-examples/3.png"],
416
+ }
417
+ ],
418
+ [
419
+ {
420
+ "text": "์ด ์ ๋ถ„์„ ํ’€์–ด์ฃผ์„ธ์š”.",
421
+ "files": ["assets/additional-examples/4.png"],
422
+ }
423
+ ],
424
+ [
425
+ {
426
+ "text": "์ด ์ด๋ฏธ์ง€๋ฅผ ๊ฐ„๋‹จํžˆ ์บก์…˜์œผ๋กœ ์„ค๋ช…ํ•ด์ฃผ์„ธ์š”.",
427
+ "files": ["assets/sample-images/01.png"],
428
+ }
429
+ ],
430
+ [
431
+ {
432
+ "text": "์ด ํ‘œ์ง€ํŒ์—๋Š” ๋ฌด์Šจ ๋ฌธ๊ตฌ๊ฐ€ ์ ํ˜€ ์žˆ๋‚˜์š”?",
433
+ "files": ["assets/sample-images/02.png"],
434
+ }
435
+ ],
436
+ [
437
+ {
438
+ "text": "๋‘ ์ด๋ฏธ์ง€๋ฅผ ๋น„๊ตํ•ด์„œ ๊ณตํ†ต์ ๊ณผ ์ฐจ์ด์ ์„ ๋งํ•ด์ฃผ์„ธ์š”.",
439
+ "files": ["assets/sample-images/03.png"],
440
+ }
441
+ ],
442
+ [
443
+ {
444
+ "text": "์ด๋ฏธ์ง€์— ๋ณด์ด๋Š” ๋ชจ๋“  ์‚ฌ๋ฌผ๊ณผ ๊ทธ ์ƒ‰์ƒ์„ ๋‚˜์—ดํ•ด์ฃผ์„ธ์š”.",
445
+ "files": ["assets/sample-images/04.png"],
446
+ }
447
+ ],
448
+ [
449
+ {
450
+ "text": "์žฅ๋ฉด์˜ ๋ถ„์œ„๊ธฐ๋ฅผ ๋ฌ˜์‚ฌํ•ด์ฃผ์„ธ์š”.",
451
+ "files": ["assets/sample-images/05.png"],
452
  }
453
  ],
 
454
  ]
455
 
456
 
457
+
458
  demo = gr.ChatInterface(
459
  fn=run,
460
  type="messages",