Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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)
|