userdotcs commited on
Commit
1a77822
·
verified ·
1 Parent(s): 3320168

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -2
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
- formatted_prompt = f"Fix typos in the text:\n{input_text}"
30
- messages = [{"role": "user", "content": formatted_prompt}]
 
 
 
 
 
 
 
 
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,