Update app.py
Browse files
app.py
CHANGED
|
@@ -26,8 +26,16 @@ def fix_text(input_text):
|
|
| 26 |
if not input_text or input_text.strip() == "":
|
| 27 |
return ""
|
| 28 |
|
| 29 |
-
|
| 30 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
|
| 32 |
inputs = tokenizer.apply_chat_template(
|
| 33 |
messages,
|
|
|
|
| 26 |
if not input_text or input_text.strip() == "":
|
| 27 |
return ""
|
| 28 |
|
| 29 |
+
messages = [
|
| 30 |
+
{
|
| 31 |
+
"role": "system",
|
| 32 |
+
"content": "You are an intelligent assistant that corrects Turkish spelling and grammar mistakes."
|
| 33 |
+
},
|
| 34 |
+
{
|
| 35 |
+
"role": "user",
|
| 36 |
+
"content": f"Fix typos in the text:\n{input_text}"
|
| 37 |
+
}
|
| 38 |
+
]
|
| 39 |
|
| 40 |
inputs = tokenizer.apply_chat_template(
|
| 41 |
messages,
|