Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,100 +1,260 @@
|
|
| 1 |
-
|
| 2 |
-
|
|
|
|
|
|
|
| 3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
import gradio as gr
|
| 5 |
-
import trafilatura
|
| 6 |
from markdownify import markdownify as md
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
|
| 8 |
|
| 9 |
-
#
|
|
|
|
|
|
|
|
|
|
| 10 |
MODEL_OPTIONS = {
|
| 11 |
"Qwen2.5-1.5B-Instruct": "Qwen/Qwen2.5-1.5B-Instruct",
|
| 12 |
-
"CLOVA-Text(๋์ฒด)":
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
}
|
| 14 |
|
| 15 |
-
#
|
| 16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
model_name = MODEL_OPTIONS[model_choice]
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
|
|
|
|
|
|
| 21 |
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
|
|
|
| 25 |
|
| 26 |
-
#
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
|
| 31 |
-
# ===== LLM ์์ฝ =====
|
| 32 |
-
def llm_summary(text, model_choice):
|
| 33 |
-
llm = load_text_model(model_choice)
|
| 34 |
-
prompt = f"๋ค์ ๊ธ์ 3๋ฌธ์ฅ ์ด๋ด๋ก ์์ฝ:\n{text}"
|
| 35 |
-
out = llm(prompt, max_new_tokens=150, do_sample=False, temperature=0.7,
|
| 36 |
-
repetition_penalty=1.2, no_repeat_ngram_size=3)
|
| 37 |
-
return out[0]["generated_text"].replace(prompt, "").strip()
|
| 38 |
-
|
| 39 |
-
# ===== ๋ถํ ์์ฝ โ ํตํฉ ์์ฝ =====
|
| 40 |
-
def multi_stage_summary(text, model_choice):
|
| 41 |
-
chunks = chunk_text(text)
|
| 42 |
-
partial_summaries = [llm_summary(chunk, model_choice) for chunk in chunks]
|
| 43 |
-
combined_summary = " ".join(partial_summaries)
|
| 44 |
-
return llm_summary(combined_summary, model_choice)
|
| 45 |
-
|
| 46 |
-
# ===== ์ฌ์์ฑ =====
|
| 47 |
-
def rewrite_with_llm(text, model_choice):
|
| 48 |
llm = load_text_model(model_choice)
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 61 |
try:
|
| 62 |
-
|
|
|
|
| 63 |
r.raise_for_status()
|
| 64 |
|
| 65 |
-
#
|
| 66 |
-
plain_text = trafilatura.extract(
|
| 67 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 68 |
markdown_text = md(html_content or r.text, heading_style="ATX")
|
| 69 |
|
| 70 |
-
#
|
| 71 |
-
|
| 72 |
-
|
|
|
|
|
|
|
|
|
|
| 73 |
|
| 74 |
-
#
|
| 75 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 76 |
|
| 77 |
-
|
| 78 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 79 |
|
| 80 |
-
return link_html + "<br><br>" + markdown_text, final_summary, paraphrased_text
|
| 81 |
except Exception as e:
|
| 82 |
-
return f"
|
|
|
|
|
|
|
|
|
|
|
|
|
| 83 |
|
| 84 |
-
# ===== Gradio UI =====
|
| 85 |
iface = gr.Interface(
|
| 86 |
fn=process_url,
|
| 87 |
inputs=[
|
| 88 |
-
gr.Textbox(label="URL ์
๋ ฅ", placeholder="https://
|
| 89 |
-
gr.Dropdown(choices=list(MODEL_OPTIONS.keys()),
|
|
|
|
|
|
|
| 90 |
],
|
| 91 |
outputs=[
|
| 92 |
-
gr.HTML(label="์๋ฌธ ๋งํฌ + ์ถ์ถ๋ ๋ณธ๋ฌธ"),
|
| 93 |
-
gr.Textbox(label="์๋ ์์ฝ", lines=
|
| 94 |
-
gr.Textbox(label="์๋ ์ฌ์์ฑ
|
|
|
|
| 95 |
],
|
| 96 |
-
title="ํ๊ตญ์ด
|
| 97 |
-
description="
|
| 98 |
)
|
| 99 |
|
| 100 |
if __name__ == "__main__":
|
|
|
|
| 1 |
+
# app.py
|
| 2 |
+
# ํ๊ตญ์ด ๊ธฐ์ฌ ์ถ์ถ โ ์ ํ ์์ถ(๋น๋ถํ ) โ LLM ์์ฝ โ LLM ์ฌ์์ฑ
|
| 3 |
+
# ๋ชจ๋ธ: Qwen2.5-1.5B-Instruct, skt/kogpt2-base-v2 (๋ ๋ค ์ ์ง)
|
| 4 |
+
# ํ์๋ฆฌ/๋ฐ๋ณต ์ต์ : ์ ์ฒ๋ฆฌ, ๋์ฝ๋ฉ ์ ์ฝ, ๊ฒฐ๊ณผ ๊ฒ์ฆ(ํด๋ฐฑ) ์ ์ฉ
|
| 5 |
|
| 6 |
+
import re
|
| 7 |
+
import time
|
| 8 |
+
import uuid
|
| 9 |
+
import json
|
| 10 |
+
import requests
|
| 11 |
import gradio as gr
|
| 12 |
+
import trafilatura
|
| 13 |
from markdownify import markdownify as md
|
| 14 |
+
|
| 15 |
+
# ์ ํ ์์ถ(๋ฌธ๋งฅ ๋ณด์กดํ ๋ฌธ์ฅ ์ ํ)
|
| 16 |
+
from sumy.parsers.plaintext import PlaintextParser
|
| 17 |
+
from sumy.nlp.tokenizers import Tokenizer
|
| 18 |
+
from sumy.summarizers.text_rank import TextRankSummarizer
|
| 19 |
+
|
| 20 |
+
# Hugging Face
|
| 21 |
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
|
| 22 |
|
| 23 |
+
# =========================
|
| 24 |
+
# ๋ชจ๋ธ ํ๋ฆฌ์
/๋ก๋
|
| 25 |
+
# =========================
|
| 26 |
+
|
| 27 |
MODEL_OPTIONS = {
|
| 28 |
"Qwen2.5-1.5B-Instruct": "Qwen/Qwen2.5-1.5B-Instruct",
|
| 29 |
+
"CLOVA-Text(๋์ฒด)": "skt/kogpt2-base-v2"
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
PRESETS = {
|
| 33 |
+
"Qwen2.5-1.5B-Instruct": dict(do_sample=False, temperature=0.2, top_p=0.9,
|
| 34 |
+
repetition_penalty=1.2, no_repeat_ngram_size=3),
|
| 35 |
+
"CLOVA-Text(๋์ฒด)": dict(do_sample=False, temperature=0.2, top_p=0.9,
|
| 36 |
+
repetition_penalty=1.25, no_repeat_ngram_size=4),
|
| 37 |
}
|
| 38 |
|
| 39 |
+
# ๊ฐ๋จ ์บ์(์ธ์
์ค ์ค๋ณต ๋ก๋ฉ ๋ฐฉ์ง)
|
| 40 |
+
_PIPELINES = {}
|
| 41 |
+
|
| 42 |
+
def load_text_model(model_choice: str):
|
| 43 |
+
if model_choice in _PIPELINES:
|
| 44 |
+
return _PIPELINES[model_choice]
|
| 45 |
model_name = MODEL_OPTIONS[model_choice]
|
| 46 |
+
tok = AutoTokenizer.from_pretrained(model_name)
|
| 47 |
+
mdl = AutoModelForCausalLM.from_pretrained(model_name)
|
| 48 |
+
pl = pipeline("text-generation", model=mdl, tokenizer=tok, device=-1) # CPU
|
| 49 |
+
_PIPELINES[model_choice] = pl
|
| 50 |
+
return pl
|
| 51 |
|
| 52 |
+
def llm_generate(llm, prompt: str, model_choice: str, max_new_tokens: int):
|
| 53 |
+
kw = PRESETS.get(model_choice, PRESETS["Qwen2.5-1.5B-Instruct"]).copy()
|
| 54 |
+
out = llm(prompt, max_new_tokens=max_new_tokens, **kw)[0]["generated_text"]
|
| 55 |
+
return out
|
| 56 |
|
| 57 |
+
# =========================
|
| 58 |
+
# ์ ์ฒ๋ฆฌ / ์ ํ ์์ถ / ๊ฐ๋๋ ์ผ
|
| 59 |
+
# =========================
|
| 60 |
+
|
| 61 |
+
def dedup_lines(text: str) -> str:
|
| 62 |
+
seen, out = set(), []
|
| 63 |
+
for line in text.splitlines():
|
| 64 |
+
s = line.strip()
|
| 65 |
+
if s and s not in seen:
|
| 66 |
+
seen.add(s)
|
| 67 |
+
out.append(s)
|
| 68 |
+
return " ".join(out)
|
| 69 |
+
|
| 70 |
+
def compress_repeated_phrases(text: str) -> str:
|
| 71 |
+
# 4ํ ์ด์ ๋ฐ๋ณต๋๋ 2~20์ ๊ตฌ์ ์ 3ํ๋ก ์ถ์ฝ
|
| 72 |
+
return re.sub(r"(\S.{3,20}?)\s+(?:\1\s+){3,}", r"\1 \1 \1 ", text)
|
| 73 |
+
|
| 74 |
+
def preprocess(text: str) -> str:
|
| 75 |
+
t = dedup_lines(text)
|
| 76 |
+
t = compress_repeated_phrases(t)
|
| 77 |
+
t = re.sub(r"\s+", " ", t).strip()
|
| 78 |
+
return t
|
| 79 |
+
|
| 80 |
+
def select_key_sentences(text: str, target_chars: int = 1200, k: int = 10) -> str:
|
| 81 |
+
"""
|
| 82 |
+
๋น๋ถํ ๋ฐฉ์: ์๋ฌธ ์ ์ฒด์์ ํต์ฌ ๋ฌธ์ฅ์ ๊ณ ๋ฅด๊ณ ์๋ฌธ ์์๋ฅผ ์ต๋ํ ๋ณด์กด.
|
| 83 |
+
target_chars: LLM ์
๋ ฅ ์ปจํ
์คํธ ๊ธธ์ด(์์ ๊ธฐ์ค).
|
| 84 |
+
"""
|
| 85 |
+
try:
|
| 86 |
+
parser = PlaintextParser.from_string(text, Tokenizer("korean"))
|
| 87 |
+
s = TextRankSummarizer()
|
| 88 |
+
candidates = [str(x) for x in s(parser.document, k)]
|
| 89 |
+
# ๋ฌธ์ฅ ๋จ์๋ก ์๋ฌธ์ ๋๋ candidates๊ฐ ํฌํจ๋ ๋ฌธ์ฅ๋ง ์์๋๋ก ์ ํ
|
| 90 |
+
sentences = re.split(r'(?<=[.!?ใ])\s+', text)
|
| 91 |
+
ordered = [sent for sent in sentences if any(c in sent for c in candidates)]
|
| 92 |
+
out, total = [], 0
|
| 93 |
+
for sent in (ordered or candidates):
|
| 94 |
+
if not sent.strip():
|
| 95 |
+
continue
|
| 96 |
+
if total + len(sent) <= target_chars:
|
| 97 |
+
out.append(sent)
|
| 98 |
+
total += len(sent)
|
| 99 |
+
else:
|
| 100 |
+
break
|
| 101 |
+
if out:
|
| 102 |
+
return " ".join(out)
|
| 103 |
+
return text[:target_chars]
|
| 104 |
+
except Exception:
|
| 105 |
+
# sumy ์คํจ ์ ์์ ํด๋ฐฑ
|
| 106 |
+
return text[:target_chars]
|
| 107 |
+
|
| 108 |
+
def hard_limit(s: str, n: int) -> str:
|
| 109 |
+
return s[:n].rstrip()
|
| 110 |
+
|
| 111 |
+
def jaccard(a: str, b: str) -> float:
|
| 112 |
+
sa, sb = set(a.split()), set(b.split())
|
| 113 |
+
if not sa or not sb:
|
| 114 |
+
return 0.0
|
| 115 |
+
return len(sa & sb) / len(sa | sb)
|
| 116 |
+
|
| 117 |
+
BANNED = ["๋ธ๊ธฐ", "์ฐ์ ", "์ฐ์", "์ปค๋ฎค๋ํฐ"]
|
| 118 |
+
|
| 119 |
+
def validate(original: str, summary: str, fallback: str) -> str:
|
| 120 |
+
# ์ ์ฌ๋/๊ธ์ง์ด ๊ฒ์ฌ โ ์คํจ ์ ํด๋ฐฑ
|
| 121 |
+
if jaccard(original, summary) < 0.15:
|
| 122 |
+
return fallback
|
| 123 |
+
if any(b in summary for b in BANNED):
|
| 124 |
+
return fallback
|
| 125 |
+
return summary
|
| 126 |
+
|
| 127 |
+
# =========================
|
| 128 |
+
# ํ๋กฌํํธ
|
| 129 |
+
# =========================
|
| 130 |
+
|
| 131 |
+
def build_summary_prompt(context: str) -> str:
|
| 132 |
+
return f"""์ญํ : ํ๊ตญ์ด ๊ธฐ์ฌ ์์ฝ ์ ๋ฌธ๊ฐ.
|
| 133 |
+
๊ท์น:
|
| 134 |
+
- ์๋ฌธ์ ์๋ ์ฌ์ค/์์น/์ธ์ฉ ์ถ๊ฐ ๊ธ์ง
|
| 135 |
+
- 3๋ฌธ์ฅ, 300์ ์ด๋ด
|
| 136 |
+
- ์ค๋ณต ํํ ๊ธ์ง
|
| 137 |
+
- ๊ด๊ณ /์ถ์ฒ ๊ธฐ์ฌ/์ธ๋ถ ๋งํฌ ๋ด์ฉ ์ ์ธ
|
| 138 |
+
|
| 139 |
+
์๋ฌธ:
|
| 140 |
+
{context}
|
| 141 |
+
|
| 142 |
+
์์ฝ:"""
|
| 143 |
+
|
| 144 |
+
def build_rewrite_prompt(summary: str) -> str:
|
| 145 |
+
return f"""์ญํ : ํ๊ตญ์ด ๋ฌธ์ฅ ๋ค๋ฌ๊ธฐ ์ ๋ฌธ๊ฐ.
|
| 146 |
+
๊ท์น:
|
| 147 |
+
- ์๋ฏธ ๋ณด์กด, ์ฌ์ค ์ถ๊ฐ/์ญ์ ๊ธ์ง
|
| 148 |
+
- 2~3๋ฌธ์ฅ, 250์ ์ด๋ด
|
| 149 |
+
- ๊ฐ์ ๊ตฌ์ ๋ฐ๋ณต ๊ธ์ง
|
| 150 |
+
- ๊ฐ๊ฒฐํ๊ณ ๋ช
ํํ๊ฒ
|
| 151 |
+
|
| 152 |
+
๋์:
|
| 153 |
+
{summary}
|
| 154 |
+
|
| 155 |
+
๊ฐ์ ๋ณธ:"""
|
| 156 |
+
|
| 157 |
+
# =========================
|
| 158 |
+
# ํ์ดํ๋ผ์ธ
|
| 159 |
+
# =========================
|
| 160 |
+
|
| 161 |
+
def run_pipeline(plain_text: str, model_choice: str):
|
| 162 |
+
t0 = time.time()
|
| 163 |
+
src = preprocess(plain_text)
|
| 164 |
+
condensed = select_key_sentences(src, target_chars=1200, k=10)
|
| 165 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 166 |
llm = load_text_model(model_choice)
|
| 167 |
+
|
| 168 |
+
# ์์ฝ
|
| 169 |
+
sum_prompt = build_summary_prompt(condensed)
|
| 170 |
+
raw_sum = llm_generate(llm, sum_prompt, model_choice, max_new_tokens=220).replace(sum_prompt, "").strip()
|
| 171 |
+
summary = hard_limit(raw_sum, 300)
|
| 172 |
+
extractive_fb = condensed[:300]
|
| 173 |
+
summary = validate(src, summary, extractive_fb)
|
| 174 |
+
|
| 175 |
+
# ์ฌ์์ฑ
|
| 176 |
+
rw_prompt = build_rewrite_prompt(summary)
|
| 177 |
+
raw_rw = llm_generate(llm, rw_prompt, model_choice, max_new_tokens=200).replace(rw_prompt, "").strip()
|
| 178 |
+
rewrite = hard_limit(raw_rw, 250)
|
| 179 |
+
rewrite = validate(src, rewrite, summary)
|
| 180 |
+
|
| 181 |
+
latency_ms = int((time.time() - t0) * 1000)
|
| 182 |
+
return summary, rewrite, latency_ms, src, condensed
|
| 183 |
+
|
| 184 |
+
def process_url(url: str, model_choice: str):
|
| 185 |
try:
|
| 186 |
+
# Fetch
|
| 187 |
+
r = requests.get(url, headers={"User-Agent": "Mozilla/5.0"}, timeout=12)
|
| 188 |
r.raise_for_status()
|
| 189 |
|
| 190 |
+
# ๋ณธ๋ฌธ ์ถ์ถ
|
| 191 |
+
plain_text = trafilatura.extract(
|
| 192 |
+
r.text,
|
| 193 |
+
output_format="txt",
|
| 194 |
+
include_tables=False,
|
| 195 |
+
include_comments=False,
|
| 196 |
+
favor_recall=True
|
| 197 |
+
) or ""
|
| 198 |
+
html_content = trafilatura.extract(
|
| 199 |
+
r.text,
|
| 200 |
+
output_format="html",
|
| 201 |
+
include_tables=False,
|
| 202 |
+
include_comments=False,
|
| 203 |
+
favor_recall=True
|
| 204 |
+
)
|
| 205 |
markdown_text = md(html_content or r.text, heading_style="ATX")
|
| 206 |
|
| 207 |
+
# ํ์ดํ๋ผ์ธ ์คํ
|
| 208 |
+
summary, rewrite, latency_ms, src, condensed = run_pipeline(plain_text, model_choice)
|
| 209 |
+
|
| 210 |
+
# ๋งํฌ+์๋ฌธ ๋ฏธ๋ฆฌ๋ณด๊ธฐ
|
| 211 |
+
header = plain_text.strip().split("\n")[0].strip() if plain_text else url
|
| 212 |
+
link_html = f'<a href="{url}" title="{header}" target="_blank">์๋ฌธ ๋ณด๊ธฐ</a>'
|
| 213 |
|
| 214 |
+
# ๋ก๊ทธ(์ฝ์)
|
| 215 |
+
print(json.dumps({
|
| 216 |
+
"id": str(uuid.uuid4()),
|
| 217 |
+
"model": model_choice,
|
| 218 |
+
"url": url,
|
| 219 |
+
"len_src": len(src),
|
| 220 |
+
"len_condensed": len(condensed),
|
| 221 |
+
"len_sum": len(summary),
|
| 222 |
+
"len_rw": len(rewrite),
|
| 223 |
+
"jaccard_sum": jaccard(src, summary),
|
| 224 |
+
"jaccard_rw": jaccard(src, rewrite),
|
| 225 |
+
"latency_ms": latency_ms
|
| 226 |
+
}, ensure_ascii=False))
|
| 227 |
|
| 228 |
+
return (
|
| 229 |
+
link_html + "<br><br>" + markdown_text,
|
| 230 |
+
summary,
|
| 231 |
+
rewrite,
|
| 232 |
+
f"{latency_ms} ms"
|
| 233 |
+
)
|
| 234 |
|
|
|
|
| 235 |
except Exception as e:
|
| 236 |
+
return f"<b>์๋ฌ</b>: {e}", "", "", ""
|
| 237 |
+
|
| 238 |
+
# =========================
|
| 239 |
+
# UI
|
| 240 |
+
# =========================
|
| 241 |
|
|
|
|
| 242 |
iface = gr.Interface(
|
| 243 |
fn=process_url,
|
| 244 |
inputs=[
|
| 245 |
+
gr.Textbox(label="URL ์
๋ ฅ", placeholder="https://n.news.naver.com/..."),
|
| 246 |
+
gr.Dropdown(choices=list(MODEL_OPTIONS.keys()),
|
| 247 |
+
value="Qwen2.5-1.5B-Instruct",
|
| 248 |
+
label="๋ชจ๋ธ ์ ํ")
|
| 249 |
],
|
| 250 |
outputs=[
|
| 251 |
+
gr.HTML(label="์๋ฌธ ๋งํฌ + ์ถ์ถ๋ ๋ณธ๋ฌธ ๋ฏธ๋ฆฌ๋ณด๊ธฐ"),
|
| 252 |
+
gr.Textbox(label="์๋ ์์ฝ(3๋ฌธ์ฅ/300์ ์ด๋ด)", lines=6),
|
| 253 |
+
gr.Textbox(label="์๋ ์ฌ์์ฑ(2~3๋ฌธ์ฅ/250์ ์ด๋ด)", lines=6),
|
| 254 |
+
gr.Textbox(label="์ง์ฐ ์๊ฐ", lines=1)
|
| 255 |
],
|
| 256 |
+
title="ํ๊ตญ์ด ๋ด์ค ์์ฝยท์ฌ์์ฑ (๋น๋ถํ ์ปจํ
์คํธ)",
|
| 257 |
+
description="ํ์ฑ ์๋ฌธ ์ ์ฒด๋ฅผ ์ ํ์ ์ผ๋ก ์์ถํด ๋ฌธ๋งฅ์ ์ ์งํ๊ณ , LLM ์์ฝ/์ฌ์์ฑ์ ๊ฐํ ์ ์ฝ๊ณผ ํด๋ฐฑ์ ์ ์ฉํฉ๋๋ค."
|
| 258 |
)
|
| 259 |
|
| 260 |
if __name__ == "__main__":
|