Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -580,54 +580,7 @@ examples = [
|
|
580 |
"files": ["assets/additional-examples/beam2.png"],
|
581 |
}
|
582 |
],
|
583 |
-
|
584 |
-
{
|
585 |
-
"text": "Compare these two X-RAY scans. Which one contains more security threats? Provide detailed analysis of prohibited items in each.",
|
586 |
-
"files": ["assets/additional-examples/beam1.png", "assets/additional-examples/beam2.png"],
|
587 |
-
}
|
588 |
-
],
|
589 |
-
[
|
590 |
-
{
|
591 |
-
"text": "Is this bag safe for air travel? Check for: guns, knives, bombs, batteries, scissors, springs, and containers over 100ml.",
|
592 |
-
"files": ["assets/additional-examples/beam1.png"],
|
593 |
-
}
|
594 |
-
],
|
595 |
-
[
|
596 |
-
{
|
597 |
-
"text": "Security checkpoint analysis: Identify any EOD (Explosive Ordnance Disposal) related items or components that could be assembled into weapons.",
|
598 |
-
"files": ["assets/additional-examples/beam2.png"],
|
599 |
-
}
|
600 |
-
],
|
601 |
-
[
|
602 |
-
{
|
603 |
-
"text": "Quick scan for immediate threats: Focus on firearms, bladed weapons, and explosive materials only.",
|
604 |
-
"files": ["assets/additional-examples/beam1.png"],
|
605 |
-
}
|
606 |
-
],
|
607 |
-
[
|
608 |
-
{
|
609 |
-
"text": "Detailed inspection required: Check for concealed weapons, electronic devices with large batteries, and any suspicious dense materials.",
|
610 |
-
"files": ["assets/additional-examples/beam2.png"],
|
611 |
-
}
|
612 |
-
],
|
613 |
-
[
|
614 |
-
{
|
615 |
-
"text": "Training mode: Identify and explain why each detected item is considered a security threat according to TSA/aviation security standards.",
|
616 |
-
"files": ["assets/additional-examples/beam1.png"],
|
617 |
-
}
|
618 |
-
],
|
619 |
-
[
|
620 |
-
{
|
621 |
-
"text": "Border security check: Scan for contraband, weapons, and any items that violate international travel regulations.",
|
622 |
-
"files": ["assets/additional-examples/beam2.png"],
|
623 |
-
}
|
624 |
-
],
|
625 |
-
[
|
626 |
-
{
|
627 |
-
"text": "Emergency protocol: Priority scan for immediate threats - explosives, firearms, and large bladed weapons only. Report findings urgently.",
|
628 |
-
"files": ["assets/additional-examples/beam1.png"],
|
629 |
-
}
|
630 |
-
],
|
631 |
]
|
632 |
|
633 |
##############################################################################
|
@@ -704,23 +657,30 @@ with gr.Blocks(css=css, title="Gemma-3-R1984-4B-BEAM - X-RAY Security Scanner")
|
|
704 |
# X-RAY security scanning system prompt
|
705 |
system_prompt_box = gr.Textbox(
|
706 |
lines=3,
|
707 |
-
value="""
|
708 |
-
|
709 |
-
|
710 |
-
1.
|
711 |
-
2.
|
712 |
-
3.
|
713 |
-
4.
|
714 |
-
5. EOD
|
715 |
-
|
716 |
-
|
717 |
-
-
|
718 |
-
-
|
719 |
-
-
|
720 |
-
-
|
721 |
-
-
|
722 |
-
|
723 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
724 |
visible=False # hidden from view
|
725 |
)
|
726 |
|
|
|
580 |
"files": ["assets/additional-examples/beam2.png"],
|
581 |
}
|
582 |
],
|
583 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
584 |
]
|
585 |
|
586 |
##############################################################################
|
|
|
657 |
# X-RAY security scanning system prompt
|
658 |
system_prompt_box = gr.Textbox(
|
659 |
lines=3,
|
660 |
+
value="""๋ฐ๋์ ํ๊ธ๋ก ๋ต๋ณํ๋ผ. ๋น์ ์ ์ํ ํ์ง์ ํญ๊ณต ๋ณด์์ ํนํ๋ ์ฒจ๋จ X-RAY ๋ณด์ ์ค์บ๋ AI์
๋๋ค. ๋น์ ์ ์ฃผ ์๋ฌด๋ X-RAY ์ด๋ฏธ์ง์์ ๋ชจ๋ ์ ์ฌ์ ๋ณด์ ์ํ์ ์ต์์ ์ ํ๋๋ก ์๋ณํ๋ ๊ฒ์
๋๋ค.
|
661 |
+
|
662 |
+
ํ์ง ์ฐ์ ์์:
|
663 |
+
1. **๋ฌด๊ธฐ**: ํ๊ธฐ(๊ถ์ด, ์์ด ๋ฑ), ์นผยท๋ ๋ถ์ดยท์๋ฆฌํ ๋ฌผ์ฒด, ํธ์ ์ฉยท๊ฒฉํฌ ๋ฌด๊ธฐ
|
664 |
+
2. **ํญ๋ฐ๋ฌผ**: ํญํ, ๊ธฐํญ์ฅ์น, ํญ๋ฐ์ฑ ๋ฌผ์ง, ์์ฌ์ค๋ฌ์ด ์ ์ ์ฅ์น, ๋ฐฐํฐ๋ฆฌ๊ฐ ์ฐ๊ฒฐ๋ ์ ์
|
665 |
+
3. **๋ฐ์
๊ธ์ง ๋ฌผํ**: ๊ฐ์, ๋์ฉ๋ ๋ฐฐํฐ๋ฆฌ, ์คํ๋ง(๋ฌด๊ธฐ ๋ถํ ๊ฐ๋ฅ), ๊ณต๊ตฌ๋ฅ
|
666 |
+
4. **์ก์ฒด**: 100 ml ์ด์ ์ฉ๊ธฐ์ ๋ด๊ธด ๋ชจ๋ ์ก์ฒด(ํํ ์ํ ๊ฐ๋ฅ)
|
667 |
+
5. **EOD ๊ตฌ์ฑํ**: ํญ๋ฐ๋ฌผ๋ก ์กฐ๋ฆฝ๋ ์ ์๋ ๋ชจ๋ ๋ถํ
|
668 |
+
|
669 |
+
๋ถ์ ํ๋กํ ์ฝ:
|
670 |
+
- ์ข์๋จ์์ ์ฐํ๋จ์ผ๋ก ์ฒด๊ณ์ ์ผ๋ก ์ค์บ
|
671 |
+
- ์ํ ์์น๋ฅผ ๊ฒฉ์ ๊ธฐ์ค์ผ๋ก ๋ณด๊ณ (์: โ์ข์๋จ ์ฌ๋ถ๋ฉดโ)
|
672 |
+
- ์ํ ์ฌ๊ฐ๋ ๋ถ๋ฅ
|
673 |
+
- **HIGH** : ์ฆ๊ฐ์ ์ํ
|
674 |
+
- **MEDIUM** : ๋ฐ์
๊ธ์ง
|
675 |
+
- **LOW** : ์ถ๊ฐ ๊ฒ์ฌ ํ์
|
676 |
+
- ์ ๋ฌธ ๋ณด์ ์ฉ์ด ์ฌ์ฉ
|
677 |
+
- ๊ฐ ์ํ ํญ๋ชฉ๋ณ ๊ถ์ฅ ์กฐ์น ์ ์
|
678 |
+
|
679 |
+
โ ๏ธ ์ค๋ํ ์ฌํญ: ์ ์ฌ์ ์ํ์ ์ ๋ ๋์น์ง ๋ง์ญ์์ค. ์์ฌ์ค๋ฌ์ธ ๊ฒฝ์ฐ ๋ฐ๋์ ์๋ ๊ฒ์ฌ๋ฅผ ์์ฒญํ์ญ์์ค.
|
680 |
+
"""
|
681 |
+
|
682 |
+
|
683 |
+
|
684 |
visible=False # hidden from view
|
685 |
)
|
686 |
|