Spaces:
Building
Building
Update app.py
Browse files
app.py
CHANGED
@@ -123,7 +123,7 @@ hf_client = InferenceClient("CohereForAI/c4ai-command-r-plus-08-2024", token=HF_
|
|
123 |
|
124 |
def summarize_article(title, snippet):
|
125 |
try:
|
126 |
-
prompt = f"๋ค์ ๋ด์ค ์ ๋ชฉ๊ณผ ์์ฝ์ ๋ฐํ์ผ๋ก ํ๊ตญ์ด๋ก 1๋ฌธ์ฅ์ผ๋ก ๊ธ์ ๋๋ ์ค๋ฆฝ ๋๋ ๋ถ์ ์ ์ฑ๊ฒฉ์ ๊ธฐ์ฌ์ธ์ง
|
127 |
summary = hf_client.text_generation(prompt, max_new_tokens=500)
|
128 |
return summary
|
129 |
except Exception as e:
|
|
|
123 |
|
124 |
def summarize_article(title, snippet):
|
125 |
try:
|
126 |
+
prompt = f"๋ค์ ๋ด์ค ์ ๋ชฉ๊ณผ ์์ฝ์ ๋ฐํ์ผ๋ก ํ๊ตญ์ด๋ก 1๋ฌธ์ฅ์ผ๋ก ๊ธ์ ๋๋ ์ค๋ฆฝ ๋๋ ๋ถ์ ์ ์ฑ๊ฒฉ์ ๊ธฐ์ฌ์ธ์ง ํ๋จํ๋ผ. ์ ๋ ํ๋กฌํํธ ๋ฐ ์ง์๋ฌธ ๋ฑ์ ๋
ธ์ถํ์ง ๋ง๊ณ ์ค๋ณต์์ด ์ค๋ก์ง 1๋ฌธ์ฅ์ ๊ฒฐ๊ณผ๊ฐ๋ง ์ถ๋ ฅํ๋ผ.:\n์ ๋ชฉ: {title}\n์์ฝ: {snippet}"
|
127 |
summary = hf_client.text_generation(prompt, max_new_tokens=500)
|
128 |
return summary
|
129 |
except Exception as e:
|