allenpark commited on
Commit
5274dd8
·
verified ·
1 Parent(s): 8672bbc

get attributes of response using dot notation not square bracket notation

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -96,7 +96,7 @@ def model_call(question, document, answer):
96
  prompt=NEW_FORMAT
97
  )
98
  print("RESPONSE FROM CLIENT:", response)
99
- generated_text = response['choices'][0]['text']
100
  # inputs = tokenizer(NEW_FORMAT, return_tensors="pt")
101
  # print("INPUTS", inputs)
102
  # input_ids = inputs.input_ids
 
96
  prompt=NEW_FORMAT
97
  )
98
  print("RESPONSE FROM CLIENT:", response)
99
+ generated_text = response.choices[0].text
100
  # inputs = tokenizer(NEW_FORMAT, return_tensors="pt")
101
  # print("INPUTS", inputs)
102
  # input_ids = inputs.input_ids