Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -48,13 +48,9 @@ palm.configure(api_key=os.environ["PALM_KEY"])
|
|
| 48 |
|
| 49 |
def responsenew(query):
|
| 50 |
idval = uuid.uuid4()
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
print(f"UID: {uid}")
|
| 55 |
-
# print(data)
|
| 56 |
-
# data = data[0].lower()
|
| 57 |
-
# user = data[1]
|
| 58 |
response = palm.chat( messages=data)
|
| 59 |
print(response)
|
| 60 |
if data is not None:
|
|
|
|
| 48 |
|
| 49 |
def responsenew(query):
|
| 50 |
idval = uuid.uuid4()
|
| 51 |
+
text = json.loads(query)
|
| 52 |
+
data = text['text']
|
| 53 |
+
uid = text['uid']
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
response = palm.chat( messages=data)
|
| 55 |
print(response)
|
| 56 |
if data is not None:
|