CosmoAI commited on
Commit
9a8b22b
·
1 Parent(s): 2b342b3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -51,7 +51,9 @@ def responsenew(data):
51
  # print(f"{data[0]['text']}")
52
  print(f"\n\n{data}")
53
  # print(data['text'])
54
- text = json.loads(data)
 
 
55
  print(text[0]['text'])
56
  # uid = text['uid']
57
  response = palm.chat( messages=data)
 
51
  # print(f"{data[0]['text']}")
52
  print(f"\n\n{data}")
53
  # print(data['text'])
54
+ # text = json.loads(data)
55
+ decoder = json.JSONDecoder()
56
+ text = decoder.decode(data)
57
  print(text[0]['text'])
58
  # uid = text['uid']
59
  response = palm.chat( messages=data)