Spaces:
Sleeping
Sleeping
add .loads to json module call
Browse files
app.py
CHANGED
@@ -97,7 +97,7 @@ def model_call(question, document, answer):
|
|
97 |
prompt=NEW_FORMAT
|
98 |
)
|
99 |
print("RESPONSE FROM CLIENT:", response)
|
100 |
-
generated_text = json(response.choices[0].text)
|
101 |
reasoning = generated_text["REASONING"][0]
|
102 |
score = generated_text["SCORE"]
|
103 |
# inputs = tokenizer(NEW_FORMAT, return_tensors="pt")
|
|
|
97 |
prompt=NEW_FORMAT
|
98 |
)
|
99 |
print("RESPONSE FROM CLIENT:", response)
|
100 |
+
generated_text = json.loads(response.choices[0].text)
|
101 |
reasoning = generated_text["REASONING"][0]
|
102 |
score = generated_text["SCORE"]
|
103 |
# inputs = tokenizer(NEW_FORMAT, return_tensors="pt")
|