CosmoAI commited on
Commit
f07ac8e
·
1 Parent(s): 5e2d770

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
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"(remind me|remind me to)", data):
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"(add todo|add to do)", data):
113
  respo = {
114
  'messages': "Todo added!",
115
  'action': "create_todo",
@@ -124,7 +124,7 @@ def responsenew(data):
124
  'sharedByMe': [],
125
  },
126
  }
127
- if "note down" in data:
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",