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