Spaces:
Running
Running
Commit ยท
aa11860
1
Parent(s): f338c84
refactor: drop category selector from title proofreading tab
Browse filesBoth pro2 and pro3 outputs were observed to behave the same regardless
of selected category, so the selector added no informational value.
Internally uses fixed "์ผ๋ฐ๊ธฐ์ฌ" so the existing user template and
system prompt stay unchanged.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- title_proofread/ui.py +9 -18
title_proofread/ui.py
CHANGED
|
@@ -15,7 +15,9 @@ from diff_utils import highlight_diff
|
|
| 15 |
|
| 16 |
from .runner import MODELS, load_default_prompts, run_title_proofread
|
| 17 |
|
| 18 |
-
|
|
|
|
|
|
|
| 19 |
|
| 20 |
|
| 21 |
def build_title_proofread_tab(client: Any) -> None:
|
|
@@ -32,19 +34,11 @@ def build_title_proofread_tab(client: Any) -> None:
|
|
| 32 |
f"ํ๊ตญ ์ ๋ฌธ ์ ๋ชฉ ๊ต์ด ๊ฒฐ๊ณผ๋ฅผ `{MODELS[0]}` ์ `{MODELS[1]}` ๋ ๋ชจ๋ธ๋ก ๋น๊ต."
|
| 33 |
)
|
| 34 |
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
value="์ผ๋ฐ๊ธฐ์ฌ",
|
| 41 |
-
)
|
| 42 |
-
with gr.Column(scale=4):
|
| 43 |
-
original = gr.Textbox(
|
| 44 |
-
label="์ ๋ชฉ ์
๋ ฅ",
|
| 45 |
-
placeholder="์: ๊ฐ๋จ 3๊ตฌ, ๋งค๋ฌผ 30% ๋์์ง๋ง ๊ฑฐ๋๋ 15% ์ค์ด์ ",
|
| 46 |
-
lines=1,
|
| 47 |
-
)
|
| 48 |
|
| 49 |
with gr.Accordion("์ถ๋ก ์ต์
(์์ชฝ ๋ชจ๋ธ ๊ณตํต ์ ์ฉ)", open=False):
|
| 50 |
with gr.Row():
|
|
@@ -88,7 +82,6 @@ def build_title_proofread_tab(client: Any) -> None:
|
|
| 88 |
|
| 89 |
def _on_run(
|
| 90 |
original_text: str,
|
| 91 |
-
category_value: str,
|
| 92 |
temperature_val: float,
|
| 93 |
reasoning_effort_val: str,
|
| 94 |
):
|
|
@@ -100,7 +93,6 @@ def build_title_proofread_tab(client: Any) -> None:
|
|
| 100 |
return _empty()
|
| 101 |
|
| 102 |
orig_clean = original_text.strip()
|
| 103 |
-
category_clean = (category_value or "์ผ๋ฐ๊ธฐ์ฌ").strip()
|
| 104 |
|
| 105 |
# ๋ ๋ชจ๋ธ ๋ณ๋ ฌ ํธ์ถ (์ด latency = max(pro2, pro3)).
|
| 106 |
# ์์คํ
ยท์ ์ ํ๋กฌํํธ๋ ๋ด๋ถ default ๊ณ ์ โ UI ์ ๋
ธ์ถํ์ง ์์.
|
|
@@ -110,7 +102,7 @@ def build_title_proofread_tab(client: Any) -> None:
|
|
| 110 |
run_title_proofread,
|
| 111 |
client=client,
|
| 112 |
original=orig_clean,
|
| 113 |
-
category=
|
| 114 |
system_prompt=default_system,
|
| 115 |
user_template=default_user,
|
| 116 |
model=m,
|
|
@@ -143,7 +135,6 @@ def build_title_proofread_tab(client: Any) -> None:
|
|
| 143 |
_on_run,
|
| 144 |
inputs=[
|
| 145 |
original,
|
| 146 |
-
category,
|
| 147 |
temperature,
|
| 148 |
reasoning_effort,
|
| 149 |
],
|
|
|
|
| 15 |
|
| 16 |
from .runner import MODELS, load_default_prompts, run_title_proofread
|
| 17 |
|
| 18 |
+
# UI ๋จ์ํ๋ฅผ ์ํด category ๋ ์
๋ ฅ ๋ฐ์ง ์๊ณ ๋ด๋ถ ๊ณ ์ .
|
| 19 |
+
# ๋ชจ๋ธ ๊ฑฐ๋์ ์นดํ
๊ณ ๋ฆฌ๋ณ๋ก ์๋ฏธ ์๋ ์ฐจ์ด๊ฐ ๊ด์ฐฐ๋์ง ์์ ์ ํ UI ์ ๊ฑฐ.
|
| 20 |
+
DEFAULT_CATEGORY = "์ผ๋ฐ๊ธฐ์ฌ"
|
| 21 |
|
| 22 |
|
| 23 |
def build_title_proofread_tab(client: Any) -> None:
|
|
|
|
| 34 |
f"ํ๊ตญ ์ ๋ฌธ ์ ๋ชฉ ๊ต์ด ๊ฒฐ๊ณผ๋ฅผ `{MODELS[0]}` ์ `{MODELS[1]}` ๋ ๋ชจ๋ธ๋ก ๋น๊ต."
|
| 35 |
)
|
| 36 |
|
| 37 |
+
original = gr.Textbox(
|
| 38 |
+
label="์ ๋ชฉ ์
๋ ฅ",
|
| 39 |
+
placeholder="์: ๊ฐ๋จ 3๊ตฌ, ๋งค๋ฌผ 30% ๋์์ง๋ง ๊ฑฐ๋๋ 15% ์ค์ด์ ",
|
| 40 |
+
lines=1,
|
| 41 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
|
| 43 |
with gr.Accordion("์ถ๋ก ์ต์
(์์ชฝ ๋ชจ๋ธ ๊ณตํต ์ ์ฉ)", open=False):
|
| 44 |
with gr.Row():
|
|
|
|
| 82 |
|
| 83 |
def _on_run(
|
| 84 |
original_text: str,
|
|
|
|
| 85 |
temperature_val: float,
|
| 86 |
reasoning_effort_val: str,
|
| 87 |
):
|
|
|
|
| 93 |
return _empty()
|
| 94 |
|
| 95 |
orig_clean = original_text.strip()
|
|
|
|
| 96 |
|
| 97 |
# ๋ ๋ชจ๋ธ ๋ณ๋ ฌ ํธ์ถ (์ด latency = max(pro2, pro3)).
|
| 98 |
# ์์คํ
ยท์ ์ ํ๋กฌํํธ๋ ๋ด๋ถ default ๊ณ ์ โ UI ์ ๋
ธ์ถํ์ง ์์.
|
|
|
|
| 102 |
run_title_proofread,
|
| 103 |
client=client,
|
| 104 |
original=orig_clean,
|
| 105 |
+
category=DEFAULT_CATEGORY,
|
| 106 |
system_prompt=default_system,
|
| 107 |
user_template=default_user,
|
| 108 |
model=m,
|
|
|
|
| 135 |
_on_run,
|
| 136 |
inputs=[
|
| 137 |
original,
|
|
|
|
| 138 |
temperature,
|
| 139 |
reasoning_effort,
|
| 140 |
],
|