Update app.py
Browse files
app.py
CHANGED
@@ -695,52 +695,52 @@ def load_json_data():
|
|
695 |
},
|
696 |
{
|
697 |
"name": "[๊ธฐ๋ณธ/์ปดํฌ๋ํธ] ๊ฐ์ ๋ถ์ ์์คํ
",
|
698 |
-
"image_url": "data:image/png;base64," + get_image_base64('
|
699 |
"prompt": "ํ
์คํธ ๊ฐ์ ๋ถ์๊ธฐ๋ฅผ ๋ง๋ค์ด์ฃผ์ธ์. Hugging Face์ transformers.js์ 'sentiment-analysis' ํ์ดํ๋ผ์ธ์ ์ฌ์ฉํ์ฌ ํ
์คํธ์ ๊ฐ์ ์ ๋ถ์ํ๋ ์ธํฐํ์ด์ค๋ฅผ ๋ง๋ค์ด์ฃผ์ธ์."
|
700 |
},
|
701 |
{
|
702 |
"name": "[๊ธฐ๋ณธ/์ปดํฌ๋ํธ] ๋ฌธ์ฅ ์ฑ์ฐ๊ธฐ ์์คํ
",
|
703 |
-
"image_url": "data:image/png;base64," + get_image_base64('
|
704 |
"prompt": "๋ฌธ์ฅ ์์ฑ๊ธฐ๋ฅผ ๋ง๋ค์ด์ฃผ์ธ์. transformers.js์ 'fill-mask' ํ์ดํ๋ผ์ธ์ ์ฌ์ฉํ์ฌ [MASK] ํ ํฐ์ด ํฌํจ๋ ๋ฌธ์ฅ์ ์์ฑํ๋ ์ธํฐํ์ด์ค๋ฅผ ๋ง๋ค์ด์ฃผ์ธ์."
|
705 |
},
|
706 |
{
|
707 |
"name": "[๊ธฐ๋ณธ/์ปดํฌ๋ํธ] ํ
์คํธ ์์ฑ ์์คํ
",
|
708 |
-
"image_url": "data:image/png;base64," + get_image_base64('
|
709 |
"prompt": "ํ
์คํธ ์์ฑ๊ธฐ๋ฅผ ๋ง๋ค์ด์ฃผ์ธ์. transformers.js์ 'text-generation' ํ์ดํ๋ผ์ธ์ ์ฌ์ฉํ์ฌ ์์ ๋ฌธ๊ตฌ๋ก๋ถํฐ ํ
์คํธ๋ฅผ ์์ฑํ๋ ์ธํฐํ์ด์ค๋ฅผ ๋ง๋ค์ด์ฃผ์ธ์."
|
710 |
},
|
711 |
{
|
712 |
"name": "[๊ธฐ๋ณธ/์ปดํฌ๋ํธ] ์ ๋ก์ท ๋ถ๋ฅ ์์คํ
",
|
713 |
-
"image_url": "data:image/png;base64," + get_image_base64('
|
714 |
"prompt": "ํ
์คํธ ๋ถ๋ฅ๊ธฐ๋ฅผ ๋ง๋ค์ด์ฃผ์ธ์. transformers.js์ 'zero-shot-classification' ํ์ดํ๋ผ์ธ์ ์ฌ์ฉํ์ฌ ํ
์คํธ๋ฅผ ์ฃผ์ด์ง ๋ ์ด๋ธ๋ก ๋ถ๋ฅํ๋ ์ธํฐํ์ด์ค๋ฅผ ๋ง๋ค์ด์ฃผ์ธ์."
|
715 |
},
|
716 |
{
|
717 |
"name": "[์์ฉ์ฉ] ํ ํฐ ๋ถ๋ฅ ์์คํ
",
|
718 |
-
"image_url": "data:image/png;base64," + get_image_base64('
|
719 |
"prompt": "ํ ํฐ ๋ถ๋ฅ๊ธฐ๋ฅผ ๋ง๋ค์ด์ฃผ์ธ์. transformers.js์ 'token-classification' ํ์ดํ๋ผ์ธ์ ์ฌ์ฉํ์ฌ ํ
์คํธ์์ ๊ฐ์ฒด๋ช
์ ์ธ์ํ๋ ์ธํฐํ์ด์ค๋ฅผ ๋ง๋ค์ด์ฃผ์ธ์."
|
720 |
},
|
721 |
{
|
722 |
"name": "[์์ฉ] ์ง๋ฌธ ๋ต๋ณ ์์คํ
",
|
723 |
-
"image_url": "data:image/png;base64," + get_image_base64('
|
724 |
"prompt": "QA ์์คํ
์ ๋ง๋ค์ด์ฃผ์ธ์. transformers.js์ 'question-answering' ํ์ดํ๋ผ์ธ์ ์ฌ์ฉํ์ฌ ์ฃผ์ด์ง ๋ฌธ๋งฅ์์ ์ง๋ฌธ์ ๋ตํ๋ ์ธํฐํ์ด์ค๋ฅผ ๋ง๋ค์ด์ฃผ์ธ์."
|
725 |
},
|
726 |
{
|
727 |
"name": "[์์ฉ] ๋ฌธ์ฅ ์ ์ฌ๋ ์์คํ
",
|
728 |
-
"image_url": "data:image/png;base64," + get_image_base64('
|
729 |
"prompt": "๋ฌธ์ฅ ์ ์ฌ๋ ๋ถ์๊ธฐ๋ฅผ ๋ง๋ค์ด์ฃผ์ธ์. transformers.js์ 'feature-extraction' ํ์ดํ๋ผ์ธ์ ์ฌ์ฉํ์ฌ ๋ ๋ฌธ์ฅ ๊ฐ์ ์ ์ฌ๋๋ฅผ ๊ณ์ฐํ๋ ์ธํฐํ์ด์ค๋ฅผ ๋ง๋ค์ด์ฃผ์ธ์."
|
730 |
},
|
731 |
{
|
732 |
"name": "[์์ฉ] ๋ฌธ์ ์์ฝ ์์คํ
",
|
733 |
-
"image_url": "data:image/png;base64," + get_image_base64('
|
734 |
"prompt": "ํ
์คํธ ์์ฝ๊ธฐ๋ฅผ ๋ง๋ค์ด์ฃผ์ธ์. transformers.js์ 'summarization' ํ์ดํ๋ผ์ธ์ ์ฌ์ฉํ์ฌ ๊ธด ํ
์คํธ๋ฅผ ์์ฝํ๋ ์ธํฐํ์ด์ค๋ฅผ ๋ง๋ค์ด์ฃผ์ธ์."
|
735 |
},
|
736 |
{
|
737 |
"name": "[์์ฉ] ๋ฒ์ญ ์์คํ
",
|
738 |
-
"image_url": "data:image/png;base64," + get_image_base64('
|
739 |
"prompt": "๋ฒ์ญ๊ธฐ๋ฅผ ๋ง๋ค์ด์ฃผ์ธ์. transformers.js์ 'translation' ํ์ดํ๋ผ์ธ์ ์ฌ์ฉํ์ฌ ํ
์คํธ๋ฅผ ๋ค๋ฅธ ์ธ์ด๋ก ๋ฒ์ญํ๋ ์ธํฐํ์ด์ค๋ฅผ ๋ง๋ค์ด์ฃผ์ธ์."
|
740 |
},
|
741 |
{
|
742 |
"name": "[์์ฉ] ํ
์คํธ ๋ถ๋ฅ ์์คํ
",
|
743 |
-
"image_url": "data:image/png;base64," + get_image_base64('
|
744 |
"prompt": "ํ
์คํธ ๋ถ๋ฅ๊ธฐ๋ฅผ ๋ง๋ค์ด์ฃผ์ธ์. transformers.js์ 'text-classification' ํ์ดํ๋ผ์ธ์ ์ฌ์ฉํ์ฌ ํ
์คํธ๋ฅผ ๋ฏธ๋ฆฌ ์ ์๋ ์นดํ
๊ณ ๋ฆฌ๋ก ๋ถ๋ฅํ๋ ์ธํฐํ์ด์ค๋ฅผ ๋ง๋ค์ด์ฃผ์ธ์."
|
745 |
}, #์ด์ 19๊ฐ, ์ดํ 26๊ฐ
|
746 |
|
@@ -822,12 +822,12 @@ def load_json_data():
|
|
822 |
},
|
823 |
{
|
824 |
"name": "[ํ์ฉ] ์ด๋ฏธ์ง ํธ์ง๊ธฐ",
|
825 |
-
"image_url": "data:image/png;base64," + get_image_base64('
|
826 |
"prompt": "์ด๋ฏธ์ง ์
๋ก๋ ํ ํํฐ์ ์ฉ, ์๋ฅด๊ธฐ, ํ์ ๋ฑ ๊ธฐ๋ณธ ํธ์ง ๊ธฐ๋ฅ์ ์ ๊ณตํ๊ณ ํธ์ง๋ ์ด๋ฏธ์ง๋ฅผ ์ ์ฅํ์ธ์."
|
827 |
},
|
828 |
{
|
829 |
"name": "[ํ์ฉ] ๋ฐ์ดํฐ ์ฐจํธ",
|
830 |
-
"image_url": "data:image/png;base64," + get_image_base64('
|
831 |
"prompt": "๋ฐ์ดํฐ๋ฅผ ์
๋ ฅ๋ฐ์ ๋ง๋, ์ , ํ์ด ์ฐจํธ๋ก ์๊ฐํํ๊ณ , ์ฐจํธ ์ ํ ์ ํ๊ณผ ๋ฐ์ดํฐ ๊ฐฑ์ ์ ์ค์๊ฐ์ผ๋ก ์ฒ๋ฆฌํ์ธ์."
|
832 |
},
|
833 |
|
@@ -894,15 +894,15 @@ def load_json_data():
|
|
894 |
|
895 |
def load_best_templates():
|
896 |
json_data = load_json_data()[:14] # ๋ฒ ์คํธ ํ
ํ๋ฆฟ
|
897 |
-
return create_template_html("๐
|
898 |
|
899 |
def load_trending_templates():
|
900 |
json_data = load_json_data()[14:28] # ํธ๋ ๋ฉ ํ
ํ๋ฆฟ
|
901 |
-
return create_template_html("๐ฅ
|
902 |
|
903 |
def load_new_templates():
|
904 |
json_data = load_json_data()[28:50] # NEW ํ
ํ๋ฆฟ
|
905 |
-
return create_template_html("โจ
|
906 |
|
907 |
def create_template_html(title, items):
|
908 |
html_content = """
|
|
|
695 |
},
|
696 |
{
|
697 |
"name": "[๊ธฐ๋ณธ/์ปดํฌ๋ํธ] ๊ฐ์ ๋ถ์ ์์คํ
",
|
698 |
+
"image_url": "data:image/png;base64," + get_image_base64('mouse.png'),
|
699 |
"prompt": "ํ
์คํธ ๊ฐ์ ๋ถ์๊ธฐ๋ฅผ ๋ง๋ค์ด์ฃผ์ธ์. Hugging Face์ transformers.js์ 'sentiment-analysis' ํ์ดํ๋ผ์ธ์ ์ฌ์ฉํ์ฌ ํ
์คํธ์ ๊ฐ์ ์ ๋ถ์ํ๋ ์ธํฐํ์ด์ค๋ฅผ ๋ง๋ค์ด์ฃผ์ธ์."
|
700 |
},
|
701 |
{
|
702 |
"name": "[๊ธฐ๋ณธ/์ปดํฌ๋ํธ] ๋ฌธ์ฅ ์ฑ์ฐ๊ธฐ ์์คํ
",
|
703 |
+
"image_url": "data:image/png;base64," + get_image_base64('mouse.png'),
|
704 |
"prompt": "๋ฌธ์ฅ ์์ฑ๊ธฐ๋ฅผ ๋ง๋ค์ด์ฃผ์ธ์. transformers.js์ 'fill-mask' ํ์ดํ๋ผ์ธ์ ์ฌ์ฉํ์ฌ [MASK] ํ ํฐ์ด ํฌํจ๋ ๋ฌธ์ฅ์ ์์ฑํ๋ ์ธํฐํ์ด์ค๋ฅผ ๋ง๋ค์ด์ฃผ์ธ์."
|
705 |
},
|
706 |
{
|
707 |
"name": "[๊ธฐ๋ณธ/์ปดํฌ๋ํธ] ํ
์คํธ ์์ฑ ์์คํ
",
|
708 |
+
"image_url": "data:image/png;base64," + get_image_base64('mouse.png'),
|
709 |
"prompt": "ํ
์คํธ ์์ฑ๊ธฐ๋ฅผ ๋ง๋ค์ด์ฃผ์ธ์. transformers.js์ 'text-generation' ํ์ดํ๋ผ์ธ์ ์ฌ์ฉํ์ฌ ์์ ๋ฌธ๊ตฌ๋ก๋ถํฐ ํ
์คํธ๋ฅผ ์์ฑํ๋ ์ธํฐํ์ด์ค๋ฅผ ๋ง๋ค์ด์ฃผ์ธ์."
|
710 |
},
|
711 |
{
|
712 |
"name": "[๊ธฐ๋ณธ/์ปดํฌ๋ํธ] ์ ๋ก์ท ๋ถ๋ฅ ์์คํ
",
|
713 |
+
"image_url": "data:image/png;base64," + get_image_base64('mouse.png'),
|
714 |
"prompt": "ํ
์คํธ ๋ถ๋ฅ๊ธฐ๋ฅผ ๋ง๋ค์ด์ฃผ์ธ์. transformers.js์ 'zero-shot-classification' ํ์ดํ๋ผ์ธ์ ์ฌ์ฉํ์ฌ ํ
์คํธ๋ฅผ ์ฃผ์ด์ง ๋ ์ด๋ธ๋ก ๋ถ๋ฅํ๋ ์ธํฐํ์ด์ค๋ฅผ ๋ง๋ค์ด์ฃผ์ธ์."
|
715 |
},
|
716 |
{
|
717 |
"name": "[์์ฉ์ฉ] ํ ํฐ ๋ถ๋ฅ ์์คํ
",
|
718 |
+
"image_url": "data:image/png;base64," + get_image_base64('mouse.png'),
|
719 |
"prompt": "ํ ํฐ ๋ถ๋ฅ๊ธฐ๋ฅผ ๋ง๋ค์ด์ฃผ์ธ์. transformers.js์ 'token-classification' ํ์ดํ๋ผ์ธ์ ์ฌ์ฉํ์ฌ ํ
์คํธ์์ ๊ฐ์ฒด๋ช
์ ์ธ์ํ๋ ์ธํฐํ์ด์ค๋ฅผ ๋ง๋ค์ด์ฃผ์ธ์."
|
720 |
},
|
721 |
{
|
722 |
"name": "[์์ฉ] ์ง๋ฌธ ๋ต๋ณ ์์คํ
",
|
723 |
+
"image_url": "data:image/png;base64," + get_image_base64('mouse.png'),
|
724 |
"prompt": "QA ์์คํ
์ ๋ง๋ค์ด์ฃผ์ธ์. transformers.js์ 'question-answering' ํ์ดํ๋ผ์ธ์ ์ฌ์ฉํ์ฌ ์ฃผ์ด์ง ๋ฌธ๋งฅ์์ ์ง๋ฌธ์ ๋ตํ๋ ์ธํฐํ์ด์ค๋ฅผ ๋ง๋ค์ด์ฃผ์ธ์."
|
725 |
},
|
726 |
{
|
727 |
"name": "[์์ฉ] ๋ฌธ์ฅ ์ ์ฌ๋ ์์คํ
",
|
728 |
+
"image_url": "data:image/png;base64," + get_image_base64('mouse.png'),
|
729 |
"prompt": "๋ฌธ์ฅ ์ ์ฌ๋ ๋ถ์๊ธฐ๋ฅผ ๋ง๋ค์ด์ฃผ์ธ์. transformers.js์ 'feature-extraction' ํ์ดํ๋ผ์ธ์ ์ฌ์ฉํ์ฌ ๋ ๋ฌธ์ฅ ๊ฐ์ ์ ์ฌ๋๋ฅผ ๊ณ์ฐํ๋ ์ธํฐํ์ด์ค๋ฅผ ๋ง๋ค์ด์ฃผ์ธ์."
|
730 |
},
|
731 |
{
|
732 |
"name": "[์์ฉ] ๋ฌธ์ ์์ฝ ์์คํ
",
|
733 |
+
"image_url": "data:image/png;base64," + get_image_base64('mouse.png'),
|
734 |
"prompt": "ํ
์คํธ ์์ฝ๊ธฐ๋ฅผ ๋ง๋ค์ด์ฃผ์ธ์. transformers.js์ 'summarization' ํ์ดํ๋ผ์ธ์ ์ฌ์ฉํ์ฌ ๊ธด ํ
์คํธ๋ฅผ ์์ฝํ๋ ์ธํฐํ์ด์ค๋ฅผ ๋ง๋ค์ด์ฃผ์ธ์."
|
735 |
},
|
736 |
{
|
737 |
"name": "[์์ฉ] ๋ฒ์ญ ์์คํ
",
|
738 |
+
"image_url": "data:image/png;base64," + get_image_base64('mouse.png'),
|
739 |
"prompt": "๋ฒ์ญ๊ธฐ๋ฅผ ๋ง๋ค์ด์ฃผ์ธ์. transformers.js์ 'translation' ํ์ดํ๋ผ์ธ์ ์ฌ์ฉํ์ฌ ํ
์คํธ๋ฅผ ๋ค๋ฅธ ์ธ์ด๋ก ๋ฒ์ญํ๋ ์ธํฐํ์ด์ค๋ฅผ ๋ง๋ค์ด์ฃผ์ธ์."
|
740 |
},
|
741 |
{
|
742 |
"name": "[์์ฉ] ํ
์คํธ ๋ถ๋ฅ ์์คํ
",
|
743 |
+
"image_url": "data:image/png;base64," + get_image_base64('mouse.png'),
|
744 |
"prompt": "ํ
์คํธ ๋ถ๋ฅ๊ธฐ๋ฅผ ๋ง๋ค์ด์ฃผ์ธ์. transformers.js์ 'text-classification' ํ์ดํ๋ผ์ธ์ ์ฌ์ฉํ์ฌ ํ
์คํธ๋ฅผ ๋ฏธ๋ฆฌ ์ ์๋ ์นดํ
๊ณ ๋ฆฌ๋ก ๋ถ๋ฅํ๋ ์ธํฐํ์ด์ค๋ฅผ ๋ง๋ค์ด์ฃผ์ธ์."
|
745 |
}, #์ด์ 19๊ฐ, ์ดํ 26๊ฐ
|
746 |
|
|
|
822 |
},
|
823 |
{
|
824 |
"name": "[ํ์ฉ] ์ด๋ฏธ์ง ํธ์ง๊ธฐ",
|
825 |
+
"image_url": "data:image/png;base64," + get_image_base64('mouse.png'),
|
826 |
"prompt": "์ด๋ฏธ์ง ์
๋ก๋ ํ ํํฐ์ ์ฉ, ์๋ฅด๊ธฐ, ํ์ ๋ฑ ๊ธฐ๋ณธ ํธ์ง ๊ธฐ๋ฅ์ ์ ๊ณตํ๊ณ ํธ์ง๋ ์ด๋ฏธ์ง๋ฅผ ์ ์ฅํ์ธ์."
|
827 |
},
|
828 |
{
|
829 |
"name": "[ํ์ฉ] ๋ฐ์ดํฐ ์ฐจํธ",
|
830 |
+
"image_url": "data:image/png;base64," + get_image_base64('mouse.png'),
|
831 |
"prompt": "๋ฐ์ดํฐ๋ฅผ ์
๋ ฅ๋ฐ์ ๋ง๋, ์ , ํ์ด ์ฐจํธ๋ก ์๊ฐํํ๊ณ , ์ฐจํธ ์ ํ ์ ํ๊ณผ ๋ฐ์ดํฐ ๊ฐฑ์ ์ ์ค์๊ฐ์ผ๋ก ์ฒ๋ฆฌํ์ธ์."
|
832 |
},
|
833 |
|
|
|
894 |
|
895 |
def load_best_templates():
|
896 |
json_data = load_json_data()[:14] # ๋ฒ ์คํธ ํ
ํ๋ฆฟ
|
897 |
+
return create_template_html("๐ ๊ธฐ๋ณธ ํ
ํ๋ฆฟ", json_data)
|
898 |
|
899 |
def load_trending_templates():
|
900 |
json_data = load_json_data()[14:28] # ํธ๋ ๋ฉ ํ
ํ๋ฆฟ
|
901 |
+
return create_template_html("๐ฅ ์์ฉ ํ
ํ๋ฆฟ", json_data)
|
902 |
|
903 |
def load_new_templates():
|
904 |
json_data = load_json_data()[28:50] # NEW ํ
ํ๋ฆฟ
|
905 |
+
return create_template_html("โจ ํ์ฉ ํ
ํ๋ฆฟ", json_data)
|
906 |
|
907 |
def create_template_html(title, items):
|
908 |
html_content = """
|