Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -510,6 +510,30 @@ with gr.Blocks(
|
|
510 |
gr.Examples(
|
511 |
examples_per_page=20,
|
512 |
examples=[
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
513 |
[
|
514 |
{
|
515 |
"files": [
|
@@ -518,6 +542,14 @@ with gr.Blocks(
|
|
518 |
"text": "Analysieren, in welchem Land diese Szene höchstwahrscheinlich gedreht wurde.",
|
519 |
},
|
520 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
521 |
[
|
522 |
{
|
523 |
"files": [
|
@@ -526,6 +558,78 @@ with gr.Blocks(
|
|
526 |
"text": "इस तस्वीर में हर एक दृश्य तत्व का क्या प्रतिनिधित्व करता है?",
|
527 |
},
|
528 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
529 |
[
|
530 |
{
|
531 |
"files": [
|
@@ -534,6 +638,38 @@ with gr.Blocks(
|
|
534 |
"text": "Unaweza kunipa kichocheo cha kutengeneza hii pancake?",
|
535 |
},
|
536 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
537 |
],
|
538 |
inputs=[chat_input],
|
539 |
label="Image",
|
@@ -572,7 +708,7 @@ if __name__ == "__main__":
|
|
572 |
argparser.add_argument("--server_name", default="0.0.0.0", type=str)
|
573 |
argparser.add_argument("--port", default="6123", type=str)
|
574 |
argparser.add_argument(
|
575 |
-
"--model_path", default="neulab/
|
576 |
)
|
577 |
# argparser.add_argument("--model-path", type=str, default="facebook/opt-350m")
|
578 |
argparser.add_argument("--model-base", type=str, default=None)
|
|
|
510 |
gr.Examples(
|
511 |
examples_per_page=20,
|
512 |
examples=[
|
513 |
+
[
|
514 |
+
{
|
515 |
+
"files": [
|
516 |
+
f"{cur_dir}/examples/user_example_07.jpg",
|
517 |
+
],
|
518 |
+
"text": "那要我问问你,你这个是什么🐱?",
|
519 |
+
},
|
520 |
+
],
|
521 |
+
[
|
522 |
+
{
|
523 |
+
"files": [
|
524 |
+
f"{cur_dir}/examples/user_example_05.jpg",
|
525 |
+
],
|
526 |
+
"text": "この猫の目の大きさは、どのような理由で他の猫と比べて特に大きく見えますか?",
|
527 |
+
},
|
528 |
+
],
|
529 |
+
[
|
530 |
+
{
|
531 |
+
"files": [
|
532 |
+
f"{cur_dir}/examples/172197131626056_P7966202.png",
|
533 |
+
],
|
534 |
+
"text": "Why this image funny?",
|
535 |
+
},
|
536 |
+
],
|
537 |
[
|
538 |
{
|
539 |
"files": [
|
|
|
542 |
"text": "Analysieren, in welchem Land diese Szene höchstwahrscheinlich gedreht wurde.",
|
543 |
},
|
544 |
],
|
545 |
+
[
|
546 |
+
{
|
547 |
+
"files": [
|
548 |
+
f"{cur_dir}/examples/totoro.jpg",
|
549 |
+
],
|
550 |
+
"text": "¿En qué anime aparece esta escena? ¿Puedes presentarlo?",
|
551 |
+
},
|
552 |
+
],
|
553 |
[
|
554 |
{
|
555 |
"files": [
|
|
|
558 |
"text": "इस तस्वीर में हर एक दृश्य तत्व का क्या प्रतिनिधित्व करता है?",
|
559 |
},
|
560 |
],
|
561 |
+
[
|
562 |
+
{
|
563 |
+
"files": [
|
564 |
+
f"{cur_dir}/examples/hot_ballon.jpg",
|
565 |
+
],
|
566 |
+
"text": "ฉากบอลลูนลมร้อนในภาพนี้อาจอยู่ที่ไหน? สถานที่นี้มีความพิเศษอย่างไร?",
|
567 |
+
},
|
568 |
+
],
|
569 |
+
[
|
570 |
+
{
|
571 |
+
"files": [
|
572 |
+
f"{cur_dir}/examples/bar.jpg",
|
573 |
+
],
|
574 |
+
"text": "Você pode me dar ideias de design baseadas no tema de coquetéis deste letreiro?",
|
575 |
+
},
|
576 |
+
],
|
577 |
+
[
|
578 |
+
{
|
579 |
+
"files": [
|
580 |
+
f"{cur_dir}/examples/pink_lake.jpg",
|
581 |
+
],
|
582 |
+
"text": "Обясни защо езерото на този остров е в този цвят.",
|
583 |
+
},
|
584 |
+
],
|
585 |
+
[
|
586 |
+
{
|
587 |
+
"files": [
|
588 |
+
f"{cur_dir}/examples/hanzi.jpg",
|
589 |
+
],
|
590 |
+
"text": "Can you describe in Hebrew the evolution process of these four Chinese characters from pictographs to modern characters?",
|
591 |
+
},
|
592 |
+
],
|
593 |
+
[
|
594 |
+
{
|
595 |
+
"files": [
|
596 |
+
f"{cur_dir}/examples/ballon.jpg",
|
597 |
+
],
|
598 |
+
"text": "இந்த காட்சியை விவரிக்கவும், மேலும் இந்த படத்தின் அடிப்படையில் துருக்கியில் இந்த காட்சியுடன் தொடர்பான சில பிரபலமான நிகழ்வுகள் என்ன?",
|
599 |
+
},
|
600 |
+
],
|
601 |
+
[
|
602 |
+
{
|
603 |
+
"files": [
|
604 |
+
f"{cur_dir}/examples/pie.jpg",
|
605 |
+
],
|
606 |
+
"text": "Décrivez ce graphique. Quelles informations pouvons-nous en tirer?",
|
607 |
+
},
|
608 |
+
],
|
609 |
+
[
|
610 |
+
{
|
611 |
+
"files": [
|
612 |
+
f"{cur_dir}/examples/camera.jpg",
|
613 |
+
],
|
614 |
+
"text": "Apa arti dari dua angka di sebelah kiri yang ditampilkan di layar kamera?",
|
615 |
+
},
|
616 |
+
],
|
617 |
+
[
|
618 |
+
{
|
619 |
+
"files": [
|
620 |
+
f"{cur_dir}/examples/dog.jpg",
|
621 |
+
],
|
622 |
+
"text": "이 강아지의 표정을 보고 어떤 기분이나 감정을 느끼고 있는지 설명해 주시겠어요?",
|
623 |
+
},
|
624 |
+
],
|
625 |
+
[
|
626 |
+
{
|
627 |
+
"files": [
|
628 |
+
f"{cur_dir}/examples/book.jpg",
|
629 |
+
],
|
630 |
+
"text": "What language is the text in, and what does the title mean in English?",
|
631 |
+
},
|
632 |
+
],
|
633 |
[
|
634 |
{
|
635 |
"files": [
|
|
|
638 |
"text": "Unaweza kunipa kichocheo cha kutengeneza hii pancake?",
|
639 |
},
|
640 |
],
|
641 |
+
[
|
642 |
+
{
|
643 |
+
"files": [
|
644 |
+
f"{cur_dir}/examples/line chart.jpg",
|
645 |
+
],
|
646 |
+
"text": "Hãy trình bày những xu hướng mà bạn quan sát được từ biểu đồ và hiện tượng xã hội tiềm ẩn từ đó.",
|
647 |
+
},
|
648 |
+
],
|
649 |
+
[
|
650 |
+
{
|
651 |
+
"files": [
|
652 |
+
f"{cur_dir}/examples/south africa.jpg",
|
653 |
+
],
|
654 |
+
"text": "Waar is hierdie plek? Help my om ’n reisroete vir hierdie land te beplan.",
|
655 |
+
},
|
656 |
+
],
|
657 |
+
[
|
658 |
+
{
|
659 |
+
"files": [
|
660 |
+
f"{cur_dir}/examples/girl.jpg",
|
661 |
+
],
|
662 |
+
"text": "لماذا هذه الصورة مضحكة؟",
|
663 |
+
},
|
664 |
+
],
|
665 |
+
[
|
666 |
+
{
|
667 |
+
"files": [
|
668 |
+
f"{cur_dir}/examples/eagles.jpg",
|
669 |
+
],
|
670 |
+
"text": "Какой креатив должен быть в этом логотипе?",
|
671 |
+
},
|
672 |
+
],
|
673 |
],
|
674 |
inputs=[chat_input],
|
675 |
label="Image",
|
|
|
708 |
argparser.add_argument("--server_name", default="0.0.0.0", type=str)
|
709 |
argparser.add_argument("--port", default="6123", type=str)
|
710 |
argparser.add_argument(
|
711 |
+
"--model_path", default="neulab/Pangea-7B", type=str
|
712 |
)
|
713 |
# argparser.add_argument("--model-path", type=str, default="facebook/opt-350m")
|
714 |
argparser.add_argument("--model-base", type=str, default=None)
|