themeetjani commited on
Commit
707e31a
·
verified ·
1 Parent(s): 3ca613c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -7,11 +7,11 @@ client = OpenAI()
7
  openai.api_key = os.getenv("OPENAI_API_KEY")
8
  def score(m,s):
9
  response = client.chat.completions.create(
10
- model="gpt-4",
11
  messages=[
12
- {
13
  "role": "system",
14
- "content": "You are a Grading assistant. Your task is to give marks to the student answers based on the model answer. You will be provided student answer and model answer. Please check both carefully and give marks out of 10. \n\n<<REMEMBER>>\nThese answers are written by High school kids. Don't be too strict. Give marks generously. \nGive marks in the range of 0.5. \nIf the model answer and student answer is slightly matching then give marks generously. Please give output in json format like this:\n{\"output\":5}"
15
  },
16
  {
17
  "role": "user",
 
7
  openai.api_key = os.getenv("OPENAI_API_KEY")
8
  def score(m,s):
9
  response = client.chat.completions.create(
10
+ model="gpt-4-0125-preview",
11
  messages=[
12
+ {
13
  "role": "system",
14
+ "content": "You are UPSC answers evaluater. You will be given model answer and student answer. Evaluate it by comparing with the model answer and give marks. Also provide 2 comments about the student answer in short. \n<<REMEMBER>>\nIt is 10 marks question. Give marks in the range of 0.5. (ex. 0,0.5,1...)\nPlease give marks generously. If the student answer body matches more than 60% with the model answer then give full marks for body. \nIf the student answer and model answer is not relevant then give 0 marks.\ngive output in json format. Give output in this format {\"total\":,\"comments\":[comment1, comment2]}\n<<OUTPUT>>"
15
  },
16
  {
17
  "role": "user",