Spaces:
Runtime error
Runtime error
add debugging print statements and temp remove json.loads
Browse files
app.py
CHANGED
|
@@ -97,7 +97,9 @@ def model_call(question, document, answer):
|
|
| 97 |
prompt=NEW_FORMAT
|
| 98 |
)
|
| 99 |
print("RESPONSE FROM CLIENT:", response)
|
| 100 |
-
generated_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 = 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]
|
| 104 |
score = generated_text["SCORE"]
|
| 105 |
# inputs = tokenizer(NEW_FORMAT, return_tensors="pt")
|