allenpark commited on
Commit
8d436a0
·
verified ·
1 Parent(s): 7d80407

add debugging print statements and temp remove json.loads

Browse files
Files changed (1) hide show
  1. app.py +3 -1
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 = 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")
 
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")