Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -191,14 +191,11 @@ with gr.Blocks() as demo:
|
|
| 191 |
input4 = gr.Textbox(label="입력4", lines=1)
|
| 192 |
input5 = gr.Textbox(label="입력5", lines=1)
|
| 193 |
|
| 194 |
-
# 결과
|
| 195 |
answer_output = gr.Textbox(label="결과", lines=5, interactive=False)
|
| 196 |
|
| 197 |
-
# 고급 설정
|
| 198 |
with gr.Accordion("고급 설정 (일반 모델)", open=False):
|
| 199 |
-
max_tokens = gr.Slider(minimum=0, maximum=4000, value=2000, step=100, label="Max Tokens")
|
| 200 |
-
temperature = gr.Slider(minimum=0.1, maximum=1.0, value=0.7, step=0.05, label="Temperature")
|
| 201 |
-
top_p = gr.Slider(minimum=0.1, maximum=1.0, value=0.95, step=0.05, label="Top-p")
|
| 202 |
system_message = gr.Textbox(
|
| 203 |
value="""반드시 한글로 답변할 것.
|
| 204 |
너는 최고의 비서이다.
|
|
@@ -207,6 +204,9 @@ with gr.Blocks() as demo:
|
|
| 207 |
label="System Message",
|
| 208 |
lines=3
|
| 209 |
)
|
|
|
|
|
|
|
|
|
|
| 210 |
|
| 211 |
submit_button = gr.Button("전송")
|
| 212 |
|
|
@@ -241,17 +241,14 @@ with gr.Blocks() as demo:
|
|
| 241 |
# Cohere Command R+ 탭
|
| 242 |
#################
|
| 243 |
with gr.Tab("Cohere Command R+"):
|
| 244 |
-
# 입력1 ~ 입력5 (세로)
|
| 245 |
cohere_input1 = gr.Textbox(label="입력1", lines=1)
|
| 246 |
cohere_input2 = gr.Textbox(label="입력2", lines=1)
|
| 247 |
cohere_input3 = gr.Textbox(label="입력3", lines=1)
|
| 248 |
cohere_input4 = gr.Textbox(label="입력4", lines=1)
|
| 249 |
cohere_input5 = gr.Textbox(label="입력5", lines=1)
|
| 250 |
|
| 251 |
-
# 결과
|
| 252 |
cohere_answer_output = gr.Textbox(label="결과", lines=5, interactive=False)
|
| 253 |
|
| 254 |
-
# 고급 설정
|
| 255 |
with gr.Accordion("고급 설정 (Cohere)", open=False):
|
| 256 |
cohere_system_message = gr.Textbox(
|
| 257 |
value="""반드시 한글로 답변할 것.
|
|
@@ -261,8 +258,8 @@ with gr.Blocks() as demo:
|
|
| 261 |
label="System Message",
|
| 262 |
lines=3
|
| 263 |
)
|
| 264 |
-
cohere_max_tokens = gr.Slider(minimum=1, maximum=
|
| 265 |
-
cohere_temperature = gr.Slider(minimum=0.1, maximum=
|
| 266 |
cohere_top_p = gr.Slider(minimum=0.1, maximum=1.0, value=0.95, step=0.05, label="Top-P")
|
| 267 |
|
| 268 |
cohere_submit_button = gr.Button("전송")
|
|
@@ -295,17 +292,14 @@ with gr.Blocks() as demo:
|
|
| 295 |
# ChatGPT 탭
|
| 296 |
#################
|
| 297 |
with gr.Tab("gpt-4o-mini"):
|
| 298 |
-
# 입력1 ~ 입력5
|
| 299 |
chatgpt_input1 = gr.Textbox(label="입력1", lines=1)
|
| 300 |
chatgpt_input2 = gr.Textbox(label="입력2", lines=1)
|
| 301 |
chatgpt_input3 = gr.Textbox(label="입력3", lines=1)
|
| 302 |
chatgpt_input4 = gr.Textbox(label="입력4", lines=1)
|
| 303 |
chatgpt_input5 = gr.Textbox(label="입력5", lines=1)
|
| 304 |
|
| 305 |
-
# 결과
|
| 306 |
chatgpt_answer_output = gr.Textbox(label="결과", lines=5, interactive=False)
|
| 307 |
|
| 308 |
-
# 고급 설정
|
| 309 |
with gr.Accordion("고급 설정 (ChatGPT)", open=False):
|
| 310 |
chatgpt_system_message = gr.Textbox(
|
| 311 |
value="""반드시 한글로 답변할 것.
|
|
@@ -315,8 +309,8 @@ with gr.Blocks() as demo:
|
|
| 315 |
label="System Message",
|
| 316 |
lines=3
|
| 317 |
)
|
| 318 |
-
chatgpt_max_tokens = gr.Slider(minimum=1, maximum=
|
| 319 |
-
chatgpt_temperature = gr.Slider(minimum=0.1, maximum=
|
| 320 |
chatgpt_top_p = gr.Slider(minimum=0.1, maximum=1.0, value=0.95, step=0.05, label="Top-P")
|
| 321 |
|
| 322 |
chatgpt_submit_button = gr.Button("전송")
|
|
@@ -399,14 +393,12 @@ with gr.Blocks() as demo:
|
|
| 399 |
with gr.Tab("claude-3-haiku"):
|
| 400 |
gr.Markdown("claude-3-haiku모델")
|
| 401 |
|
| 402 |
-
# 입력1 ~ 입력5
|
| 403 |
claude_input1 = gr.Textbox(label="입력1", lines=1)
|
| 404 |
claude_input2 = gr.Textbox(label="입력2", lines=1)
|
| 405 |
claude_input3 = gr.Textbox(label="입력3", lines=1)
|
| 406 |
claude_input4 = gr.Textbox(label="입력4", lines=1)
|
| 407 |
claude_input5 = gr.Textbox(label="입력5", lines=1)
|
| 408 |
|
| 409 |
-
# 결과
|
| 410 |
claude_answer_output = gr.Textbox(label="결과", interactive=False, lines=5)
|
| 411 |
|
| 412 |
with gr.Accordion("고급 설정 (Claude)", open=False):
|
|
|
|
| 191 |
input4 = gr.Textbox(label="입력4", lines=1)
|
| 192 |
input5 = gr.Textbox(label="입력5", lines=1)
|
| 193 |
|
| 194 |
+
# 결과
|
| 195 |
answer_output = gr.Textbox(label="결과", lines=5, interactive=False)
|
| 196 |
|
| 197 |
+
# 고급 설정 - System Message를 Max Tokens 위로 이동
|
| 198 |
with gr.Accordion("고급 설정 (일반 모델)", open=False):
|
|
|
|
|
|
|
|
|
|
| 199 |
system_message = gr.Textbox(
|
| 200 |
value="""반드시 한글로 답변할 것.
|
| 201 |
너는 최고의 비서이다.
|
|
|
|
| 204 |
label="System Message",
|
| 205 |
lines=3
|
| 206 |
)
|
| 207 |
+
max_tokens = gr.Slider(minimum=0, maximum=2000, value=500, step=100, label="Max Tokens")
|
| 208 |
+
temperature = gr.Slider(minimum=0.1, maximum=2.0, value=0.7, step=0.05, label="Temperature")
|
| 209 |
+
top_p = gr.Slider(minimum=0.1, maximum=1.0, value=0.95, step=0.05, label="Top-p")
|
| 210 |
|
| 211 |
submit_button = gr.Button("전송")
|
| 212 |
|
|
|
|
| 241 |
# Cohere Command R+ 탭
|
| 242 |
#################
|
| 243 |
with gr.Tab("Cohere Command R+"):
|
|
|
|
| 244 |
cohere_input1 = gr.Textbox(label="입력1", lines=1)
|
| 245 |
cohere_input2 = gr.Textbox(label="입력2", lines=1)
|
| 246 |
cohere_input3 = gr.Textbox(label="입력3", lines=1)
|
| 247 |
cohere_input4 = gr.Textbox(label="입력4", lines=1)
|
| 248 |
cohere_input5 = gr.Textbox(label="입력5", lines=1)
|
| 249 |
|
|
|
|
| 250 |
cohere_answer_output = gr.Textbox(label="결과", lines=5, interactive=False)
|
| 251 |
|
|
|
|
| 252 |
with gr.Accordion("고급 설정 (Cohere)", open=False):
|
| 253 |
cohere_system_message = gr.Textbox(
|
| 254 |
value="""반드시 한글로 답변할 것.
|
|
|
|
| 258 |
label="System Message",
|
| 259 |
lines=3
|
| 260 |
)
|
| 261 |
+
cohere_max_tokens = gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max Tokens")
|
| 262 |
+
cohere_temperature = gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature")
|
| 263 |
cohere_top_p = gr.Slider(minimum=0.1, maximum=1.0, value=0.95, step=0.05, label="Top-P")
|
| 264 |
|
| 265 |
cohere_submit_button = gr.Button("전송")
|
|
|
|
| 292 |
# ChatGPT 탭
|
| 293 |
#################
|
| 294 |
with gr.Tab("gpt-4o-mini"):
|
|
|
|
| 295 |
chatgpt_input1 = gr.Textbox(label="입력1", lines=1)
|
| 296 |
chatgpt_input2 = gr.Textbox(label="입력2", lines=1)
|
| 297 |
chatgpt_input3 = gr.Textbox(label="입력3", lines=1)
|
| 298 |
chatgpt_input4 = gr.Textbox(label="입력4", lines=1)
|
| 299 |
chatgpt_input5 = gr.Textbox(label="입력5", lines=1)
|
| 300 |
|
|
|
|
| 301 |
chatgpt_answer_output = gr.Textbox(label="결과", lines=5, interactive=False)
|
| 302 |
|
|
|
|
| 303 |
with gr.Accordion("고급 설정 (ChatGPT)", open=False):
|
| 304 |
chatgpt_system_message = gr.Textbox(
|
| 305 |
value="""반드시 한글로 답변할 것.
|
|
|
|
| 309 |
label="System Message",
|
| 310 |
lines=3
|
| 311 |
)
|
| 312 |
+
chatgpt_max_tokens = gr.Slider(minimum=1, maximum=4096, value=1024, step=1, label="Max Tokens")
|
| 313 |
+
chatgpt_temperature = gr.Slider(minimum=0.1, maximum=2.0, value=0.7, step=0.05, label="Temperature")
|
| 314 |
chatgpt_top_p = gr.Slider(minimum=0.1, maximum=1.0, value=0.95, step=0.05, label="Top-P")
|
| 315 |
|
| 316 |
chatgpt_submit_button = gr.Button("전송")
|
|
|
|
| 393 |
with gr.Tab("claude-3-haiku"):
|
| 394 |
gr.Markdown("claude-3-haiku모델")
|
| 395 |
|
|
|
|
| 396 |
claude_input1 = gr.Textbox(label="입력1", lines=1)
|
| 397 |
claude_input2 = gr.Textbox(label="입력2", lines=1)
|
| 398 |
claude_input3 = gr.Textbox(label="입력3", lines=1)
|
| 399 |
claude_input4 = gr.Textbox(label="입력4", lines=1)
|
| 400 |
claude_input5 = gr.Textbox(label="입력5", lines=1)
|
| 401 |
|
|
|
|
| 402 |
claude_answer_output = gr.Textbox(label="결과", interactive=False, lines=5)
|
| 403 |
|
| 404 |
with gr.Accordion("고급 설정 (Claude)", open=False):
|