Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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
|
| 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",
|