Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -19,9 +19,17 @@ def chat_with_model(message, history):
|
|
19 |
if not loading_done:
|
20 |
return history + [[message, "β οΈ λͺ¨λΈμ΄ μμ§ λ‘λ© μ€μ
λλ€. μ μλ§ κΈ°λ€λ € μ£ΌμΈμ."]]
|
21 |
|
22 |
-
prompt = f"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
response = chat_model(prompt, max_new_tokens=200)[0]['generated_text']
|
24 |
-
|
|
|
25 |
|
26 |
# μν ν
μ€νΈ λ°ν ν¨μ (λ§€λ² μλ‘ μ½μ΄μ΄)
|
27 |
def get_status():
|
|
|
19 |
if not loading_done:
|
20 |
return history + [[message, "β οΈ λͺ¨λΈμ΄ μμ§ λ‘λ© μ€μ
λλ€. μ μλ§ κΈ°λ€λ € μ£ΌμΈμ."]]
|
21 |
|
22 |
+
prompt = f"""
|
23 |
+
### Instruction: λ€μ λ¬Έμ₯μ λΆμν΄μ 무λ‘νκ±°λ 곡격μ μΈ ννμ΄ μλμ§ νλ¨νκ³ , μλ€λ©΄ λ μμ μκ² κ³ μ³μ€.
|
24 |
+
|
25 |
+
### Input:
|
26 |
+
{message}
|
27 |
+
|
28 |
+
### Response:
|
29 |
+
"""
|
30 |
response = chat_model(prompt, max_new_tokens=200)[0]['generated_text']
|
31 |
+
response_only = response[len(prompt):].strip()
|
32 |
+
return history + [[message, response_only]]
|
33 |
|
34 |
# μν ν
μ€νΈ λ°ν ν¨μ (λ§€λ² μλ‘ μ½μ΄μ΄)
|
35 |
def get_status():
|