Cachoups commited on
Commit
b2cfb1e
·
verified ·
1 Parent(s): 437df1a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -107,12 +107,12 @@ def ra(user_question):
107
  #You are an expert in League of Legends. You correct grammar and clarity issues in questions. Only return the corrected question itself—do not add explanations, extra text, or anything in parentheses.
108
  #res1 = client_bis.text_generation(f"You know things about League of Legends. Please correct the following question for grammar and clarity.Do not give explaination:\n{user_question}\nCorrected question:", stream =False,max_new_tokens= 10, temperature = 0.1 )
109
  messages_q=[
110
- #{"role": "system", "content": "You are an familiar with League of Legends. You help correct grammar and clarity without giving additional explanations."},
111
- {"role": "system", "content": f"""You are a helpful AI that corrects grammar and clarity without giving additional explanations. You only return the corrected question itself.
112
- """},
113
- #{"role": "user", "content": f"Fix any grammar or clarity issues in the following question. Only return the corrected question itself.\n\n{user_question}"}
114
  #Fix any grammar or clarity issues in the following question. Only return the output itself.\n\n{user_question}\nOutput:
115
- {"role": "user", "content": f"Please fix any grammar and clarity issues in the following question: {user_question}"}
116
  ]
117
  print(messages_q)
118
  res = client.chat_completion(messages_q,
 
107
  #You are an expert in League of Legends. You correct grammar and clarity issues in questions. Only return the corrected question itself—do not add explanations, extra text, or anything in parentheses.
108
  #res1 = client_bis.text_generation(f"You know things about League of Legends. Please correct the following question for grammar and clarity.Do not give explaination:\n{user_question}\nCorrected question:", stream =False,max_new_tokens= 10, temperature = 0.1 )
109
  messages_q=[
110
+ {"role": "system", "content": "You are an familiar with League of Legends. You help correct grammar and clarity without giving additional explanations."},
111
+ #{"role": "system", "content": f"""You are a helpful AI that corrects grammar and clarity without giving additional explanations. You only return the corrected question itself.
112
+ #"""},
113
+ {"role": "user", "content": f"Fix any grammar or clarity issues in the following question. Only return the corrected question itself.\n\n{user_question}"}
114
  #Fix any grammar or clarity issues in the following question. Only return the output itself.\n\n{user_question}\nOutput:
115
+ #{"role": "user", "content": f"Please fix any grammar and clarity issues in the following question: {user_question}"}
116
  ]
117
  print(messages_q)
118
  res = client.chat_completion(messages_q,