Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -1130,18 +1130,64 @@ with gr.Blocks(theme='ParityError/Interstellar') as demo:
|
|
1130 |
chatbot = gr.Chatbot(
|
1131 |
height=600,
|
1132 |
type='messages' # λ©μμ§ νμ μ§μ
|
1133 |
-
|
1134 |
)
|
1135 |
-
with gr.Row():
|
1136 |
-
msg = gr.Textbox(
|
1137 |
-
label="λ©μμ§λ₯Ό μ
λ ₯νμΈμ",
|
1138 |
-
placeholder="μ: COVID-19λ₯Ό μΉλ£ν μ μλ λ¨λ°±μ§μ μμ±ν΄μ£ΌμΈμ",
|
1139 |
-
lines=2,
|
1140 |
-
scale=4
|
1141 |
-
)
|
1142 |
-
submit_btn = gr.Button("μ μ‘", variant="primary", scale=1)
|
1143 |
-
clear = gr.Button("λν λ΄μ© μ§μ°κΈ°")
|
1144 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1145 |
|
1146 |
|
1147 |
|
|
|
1130 |
chatbot = gr.Chatbot(
|
1131 |
height=600,
|
1132 |
type='messages' # λ©μμ§ νμ μ§μ
|
|
|
1133 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1134 |
|
1135 |
+
# μμ ν둬ννΈ λλ‘λ€μ΄ μΆκ°
|
1136 |
+
example_prompts = [
|
1137 |
+
"μμΈν¬λ§ μ νμ μΌλ‘ 곡격νλ λ©΄μ λ¨λ°±μ§μ μ€κ³ν΄μ£ΌμΈμ",
|
1138 |
+
"COVID-19 μ€νμ΄ν¬ λ¨λ°±μ§μ κ°νκ² κ²°ν©νλ ν체 λ¨λ°±μ§μ μμ±ν΄μ£ΌμΈμ",
|
1139 |
+
"νλΉ μμ€μ μ€μκ°μΌλ‘ λͺ¨λν°λ§νλ λ¨λ°±μ§μ λ§λ€μ΄μ£ΌμΈμ",
|
1140 |
+
"μμΈ νμ΄λ¨Έ λ² ν μλ°λ‘μ΄λλ₯Ό λΆν΄ν μ μλ ν¨μ λ¨λ°±μ§μ μ€κ³ν΄μ£ΌμΈμ",
|
1141 |
+
"μ λ§μ»€λ₯Ό μ΄κ³ κ°λλ‘ κ²μΆνλ λ¨λ°±μ§μ μμ±ν΄μ£ΌμΈμ",
|
1142 |
+
"νλΌμ€ν±μ λΆν΄ν μ μλ ν¨μ λ¨λ°±μ§μ μ€κ³ν΄μ£ΌμΈμ",
|
1143 |
+
"μ΄μ°ννμλ₯Ό ν¨μ¨μ μΌλ‘ ν¬μ§νλ λ¨λ°±μ§μ λ§λ€μ΄μ£ΌμΈμ",
|
1144 |
+
"μνμ 보쑴기κ°μ μ°μ₯νλ νκ· λ¨λ°±μ§μ μ€κ³ν΄μ£ΌμΈμ",
|
1145 |
+
"μμ μμ°μ μ΄μ§νλ ν¨μ λ¨λ°±μ§μ μμ±ν΄μ£ΌμΈμ",
|
1146 |
+
"νμ μ ν¨κ³Όμ μΌλ‘ λΆν΄νλ λ¨λ°±μ§μ μ€κ³ν΄μ£ΌμΈμ",
|
1147 |
+
"μΈμλ¦° μ νμ±μ κ°μ νλ μλ‘μ΄ νΈλ₯΄λͺ¬ λ¨λ°±μ§μ λ§λ€μ΄μ£ΌμΈμ",
|
1148 |
+
"μλ¬Όμ κ°λ μ νμ±μ λμ΄λ λ¨λ°±μ§μ μ€κ³ν΄μ£ΌμΈμ",
|
1149 |
+
"νμκ΄ μλμ§λ₯Ό ν¨μ¨μ μΌλ‘ ν¬μ§νλ λ¨λ°±μ§μ μμ±ν΄μ£ΌμΈμ",
|
1150 |
+
"ν΄μμμ μ€κΈμμ μ κ±°νλ λ¨λ°±μ§μ μ€κ³ν΄μ£ΌμΈμ",
|
1151 |
+
"μ§μ κ³ μ ν¨μ¨μ λμ΄λ ν¨μ λ¨λ°±μ§μ λ§λ€μ΄μ£ΌμΈμ",
|
1152 |
+
"μ κ²½μ λ¬λ¬Όμ§μ κ°μ§νλ λλ
Έλ°μ΄μ€μΌμλ₯Ό μ€κ³ν΄μ£ΌμΈμ",
|
1153 |
+
"νΉμ λ
μ± λ¬Όμ§μ κ°μ§νλ λ°μ΄μ€μΌμ λ¨λ°±μ§μ μμ±ν΄μ£ΌμΈμ",
|
1154 |
+
"λ°°ν°λ¦¬ μ±λ₯μ ν₯μμν€λ μ λμ± λ¨λ°±μ§μ μ€κ³ν΄μ£ΌμΈμ",
|
1155 |
+
"κ·Ήνμ κ³ μ¨μμλ μμ ν μ΄λ΄μ΄μ± λ¨λ°±μ§μ λ§λ€μ΄μ£ΌμΈμ",
|
1156 |
+
"μλΆν΄μ± νλΌμ€ν± μμ°μ μν μ€ν©ν¨μλ₯Ό μ€κ³ν΄μ£ΌμΈμ",
|
1157 |
+
"μλ¬Όμ λ³ν΄μΆ© μ νμ±μ κ°ννλ λ¨λ°±μ§μ μμ±ν΄μ£ΌμΈμ",
|
1158 |
+
"κ³ΌμΌμ μμ±μ μ‘°μ νλ λ¨λ°±μ§μ μ€κ³ν΄μ£ΌμΈμ",
|
1159 |
+
"λκΈ° μ€μΌλ¬Όμ§μ μ€μκ° κ°μ§νλ λ¨λ°±μ§μ λ§λ€μ΄μ£ΌμΈμ",
|
1160 |
+
"μμ μ€μΌμ λΆν΄νλ ν΄μ λ¨λ°±μ§μ μ€κ³ν΄μ£ΌμΈμ",
|
1161 |
+
"κ·Ήμ μ¨μμ νμ±μ μ μ§νλ μ μ¨ μ μ λ¨λ°±μ§μ μμ±ν΄μ£ΌμΈμ",
|
1162 |
+
"κ³ μ νκ²½μμ μμ ν μ¬ν΄ μ μ λ¨λ°±μ§μ μ€κ³ν΄μ£ΌμΈμ",
|
1163 |
+
"κ°ν μ°μ± νκ²½μμ μλνλ λ¨λ°±μ§μ λ§λ€μ΄μ£ΌμΈμ",
|
1164 |
+
"λλ
Έ ꡬ쑰체λ₯Ό μκ° μ‘°λ¦½νλ λ¨λ°±μ§μ μ€κ³ν΄μ£ΌμΈμ",
|
1165 |
+
"λ°©μ¬λ₯ λ¬Όμ§μ μμ νκ² λΆν΄νλ λ¨λ°±μ§μ μμ±ν΄μ£ΌμΈμ",
|
1166 |
+
"λ°©μ¬μ μ μ νμ±μ΄ μλ μ°μ£Ό νκ²½μ© λ¨λ°±μ§μ μ€κ³ν΄μ£ΌμΈμ"
|
1167 |
+
]
|
1168 |
+
|
1169 |
+
|
1170 |
+
|
1171 |
+
with gr.Row():
|
1172 |
+
msg = gr.Textbox(
|
1173 |
+
label="λ©μμ§λ₯Ό μ
λ ₯νμΈμ",
|
1174 |
+
placeholder="μ: COVID-19λ₯Ό μΉλ£ν μ μλ λ¨λ°±μ§μ μμ±ν΄μ£ΌμΈμ",
|
1175 |
+
lines=2,
|
1176 |
+
scale=4
|
1177 |
+
)
|
1178 |
+
submit_btn = gr.Button("μ μ‘", variant="primary", scale=1)
|
1179 |
+
|
1180 |
+
clear = gr.Button("λν λ΄μ© μ§μ°κΈ°")
|
1181 |
+
|
1182 |
+
# μμ μ ν μ μ
λ ₯μ°½μ μλ μ
λ ₯
|
1183 |
+
def use_example(example):
|
1184 |
+
return example
|
1185 |
+
|
1186 |
+
use_example_btn.click(
|
1187 |
+
fn=use_example,
|
1188 |
+
inputs=[example_dropdown],
|
1189 |
+
outputs=[msg]
|
1190 |
+
)
|
1191 |
|
1192 |
|
1193 |
|