Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -49,12 +49,12 @@ palm.configure(api_key=os.environ["PALM_KEY"])
|
|
49 |
def responsenew(data):
|
50 |
idval = uuid.uuid4()
|
51 |
print(data)
|
52 |
-
data = data[0].lower()
|
53 |
-
user = data[1]
|
54 |
response = palm.chat( messages=data)
|
55 |
print(response)
|
56 |
if data is not None:
|
57 |
-
if re.search(r"(
|
58 |
values = getValues(data)
|
59 |
if values[0] is not None:
|
60 |
msg = values[0]
|
@@ -109,7 +109,7 @@ def responsenew(data):
|
|
109 |
}
|
110 |
}
|
111 |
|
112 |
-
if re.search(r"(
|
113 |
respo = {
|
114 |
'messages': "Todo added!",
|
115 |
'action': "create_todo",
|
@@ -124,7 +124,7 @@ def responsenew(data):
|
|
124 |
'sharedByMe': [],
|
125 |
},
|
126 |
}
|
127 |
-
if "
|
128 |
respo = {
|
129 |
'messages': "Got it!",
|
130 |
'action': "create_note",
|
|
|
49 |
def responsenew(data):
|
50 |
idval = uuid.uuid4()
|
51 |
print(data)
|
52 |
+
# data = data[0].lower()
|
53 |
+
# user = data[1]
|
54 |
response = palm.chat( messages=data)
|
55 |
print(response)
|
56 |
if data is not None:
|
57 |
+
if re.search(r"(Remind me|Remind me to)", data):
|
58 |
values = getValues(data)
|
59 |
if values[0] is not None:
|
60 |
msg = values[0]
|
|
|
109 |
}
|
110 |
}
|
111 |
|
112 |
+
if re.search(r"(Add todo|Add to do)", data):
|
113 |
respo = {
|
114 |
'messages': "Todo added!",
|
115 |
'action': "create_todo",
|
|
|
124 |
'sharedByMe': [],
|
125 |
},
|
126 |
}
|
127 |
+
if "Note down" in data:
|
128 |
respo = {
|
129 |
'messages': "Got it!",
|
130 |
'action': "create_note",
|