Alshargi commited on
Commit
bf66848
·
verified ·
1 Parent(s): 6ef8de9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -15,12 +15,11 @@ client = OpenAI(
15
 
16
  SYSTEM_PROMPT = """
17
  You are Hadithi AI, a helpful assistant.
18
- Answer clearly, briefly, and in the same language as the user when possible.
19
- If the user writes in Arabic, answer in Arabic.
20
- If the user writes in English, answer in English.
21
  """.strip()
22
 
23
-
24
  def chat(message, history):
25
  messages = [{"role": "system", "content": SYSTEM_PROMPT}]
26
 
@@ -45,7 +44,6 @@ def chat(message, history):
45
 
46
  return answer
47
 
48
-
49
  demo = gr.ChatInterface(
50
  fn=chat,
51
  title="Hadithi AI",
 
15
 
16
  SYSTEM_PROMPT = """
17
  You are Hadithi AI, a helpful assistant.
18
+ Answer clearly and briefly.
19
+ Reply in Arabic if the user writes in Arabic.
20
+ Reply in English if the user writes in English.
21
  """.strip()
22
 
 
23
  def chat(message, history):
24
  messages = [{"role": "system", "content": SYSTEM_PROMPT}]
25
 
 
44
 
45
  return answer
46
 
 
47
  demo = gr.ChatInterface(
48
  fn=chat,
49
  title="Hadithi AI",