Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -51,13 +51,13 @@ 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 |
# decoder = json.JSONDecoder()
|
56 |
-
data_list = text["data"]
|
57 |
-
item = data_list[0]
|
58 |
-
item_one = item["text"]
|
59 |
# text = decoder.decode(data)
|
60 |
-
print("finally: ",item_one)
|
61 |
# uid = text['uid']
|
62 |
response = palm.chat( messages=data)
|
63 |
print(f"\n{response.last}")
|
|
|
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 |
+
# data_list = text["data"]
|
57 |
+
# item = data_list[0]
|
58 |
+
# item_one = item["text"]
|
59 |
# text = decoder.decode(data)
|
60 |
+
# print("finally: ",item_one)
|
61 |
# uid = text['uid']
|
62 |
response = palm.chat( messages=data)
|
63 |
print(f"\n{response.last}")
|