Spaces:
Runtime error
Runtime error
add json.loads back with debugging printing lines
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 = response.choices[0].text
|
| 101 |
print("GENERATED TEXT", generated_text)
|
| 102 |
print("type of GENERATED TEXT", type(generated_text))
|
| 103 |
reasoning = generated_text["REASONING"][0]
|
|
|
|
| 97 |
prompt=NEW_FORMAT
|
| 98 |
)
|
| 99 |
print("RESPONSE FROM CLIENT:", response)
|
| 100 |
+
generated_text = json.loads(response.choices[0].text)
|
| 101 |
print("GENERATED TEXT", generated_text)
|
| 102 |
print("type of GENERATED TEXT", type(generated_text))
|
| 103 |
reasoning = generated_text["REASONING"][0]
|