anasfsd123 commited on
Commit
7e6ca88
·
verified ·
1 Parent(s): 0ffeb2a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -16,19 +16,18 @@ else:
16
  "Analyze the following query to identify potential challenges and actionable solutions "
17
  "for schools, colleges, or universities in underserved regions. Provide detailed insights, "
18
  "including possible names of institutions as examples where applicable.\n\n"
19
- f"User Query: {user_input}\n\n"
20
  "If the query is unrelated to this topic, do not provide an answer."
21
  )
22
 
23
  try:
24
  chat_completion = client.chat.completions.create(
25
- model="llama3-70b-8192",
26
  messages=[
27
  {"role": "system", "content": system_prompt},
28
  {"role": "user", "content": user_input}
29
- ]
 
30
  )
31
- return chat_completion.choices[0]["message"]["content"]
32
  except Exception as e:
33
  return f"Error: {str(e)}"
34
 
 
16
  "Analyze the following query to identify potential challenges and actionable solutions "
17
  "for schools, colleges, or universities in underserved regions. Provide detailed insights, "
18
  "including possible names of institutions as examples where applicable.\n\n"
 
19
  "If the query is unrelated to this topic, do not provide an answer."
20
  )
21
 
22
  try:
23
  chat_completion = client.chat.completions.create(
 
24
  messages=[
25
  {"role": "system", "content": system_prompt},
26
  {"role": "user", "content": user_input}
27
+ ],
28
+ model="llama3-70b-8192"
29
  )
30
+ return chat_completion.choices[0].message.content
31
  except Exception as e:
32
  return f"Error: {str(e)}"
33