Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -49,8 +49,9 @@ palm.configure(api_key=os.environ["PALM_KEY"])
|
|
| 49 |
def responsenew(data):
|
| 50 |
idval = str(uuid.uuid4())
|
| 51 |
print(f"\n\n{data}")
|
|
|
|
| 52 |
try:
|
| 53 |
-
items = json.loads(
|
| 54 |
text = items['text']
|
| 55 |
print(text)
|
| 56 |
except json.JSONDecodeError as e:
|
|
|
|
| 49 |
def responsenew(data):
|
| 50 |
idval = str(uuid.uuid4())
|
| 51 |
print(f"\n\n{data}")
|
| 52 |
+
newdata = data.replace("'", '"')
|
| 53 |
try:
|
| 54 |
+
items = json.loads(newdata)
|
| 55 |
text = items['text']
|
| 56 |
print(text)
|
| 57 |
except json.JSONDecodeError as e:
|