Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import gradio as gr
|
2 |
import requests
|
3 |
import time
|
|
|
1 |
+
# elif response[1] == "create_reminder":
|
2 |
+
# # if values[4] == 'notime':
|
3 |
+
# # return JsonResponse({
|
4 |
+
# # 'messages': 'At what time do you want me to remind you?',
|
5 |
+
# # })
|
6 |
+
# # else:
|
7 |
+
# return JsonResponse({
|
8 |
+
# 'messages': response[0],
|
9 |
+
# 'action': response[1],
|
10 |
+
# 'function': {
|
11 |
+
# 'id': idval,
|
12 |
+
# 'sound': 'General',
|
13 |
+
# 'subTitle': 'Task',
|
14 |
+
# 'type': 'Note',
|
15 |
+
# 'title': values[0],
|
16 |
+
# 'description': '',
|
17 |
+
# 'time': values[1].upper(),
|
18 |
+
# 'timestamp' : datetime.now().strftime("%d-%m-%Y %H:%M:%S.%f"),
|
19 |
+
# 'enable': False,
|
20 |
+
# 'report': [],
|
21 |
+
# 'icon': 'https://firebasestorage.googleapis.com/v0/b/cosmo-f5007.appspot.com/o/categories%2FIcons%2Ftaskicon.svg?alt=media&token=56f3fc55-8eda-4463-bceb-7bf3198dff3c',
|
22 |
+
# 'color': 'FFD700',
|
23 |
+
# 'sharedToMe': [],
|
24 |
+
# 'sharedByMe': [],
|
25 |
+
# 'repeat': 'Once',
|
26 |
+
# 'reminders': [{
|
27 |
+
# 'time': values[1].upper(),
|
28 |
+
# 'enable': False,
|
29 |
+
# 'repeat': 'Once',
|
30 |
+
# 'title': values[0],
|
31 |
+
# 'id': idval,
|
32 |
+
# 'note': '',
|
33 |
+
# 'dates': [],
|
34 |
+
# }],
|
35 |
+
# }
|
36 |
+
# })
|
37 |
+
|
38 |
+
# elif response[1] == 'create_todo':
|
39 |
+
# return JsonResponse({
|
40 |
+
# 'messages': response[0],
|
41 |
+
# 'action': response[1],
|
42 |
+
# 'function': {
|
43 |
+
# 'name': 'defaulttodo',
|
44 |
+
# 'id': idval,
|
45 |
+
# 'subTasks': [{
|
46 |
+
# 'task':values[0].replace("create a todo", ""),
|
47 |
+
# 'done': False
|
48 |
+
# }],
|
49 |
+
# 'shared': [],
|
50 |
+
# 'sharedByMe': [],
|
51 |
+
# },
|
52 |
+
# })
|
53 |
+
|
54 |
+
# elif response[1] == 'create_note':
|
55 |
+
# return JsonResponse({
|
56 |
+
# 'messages': response[0],
|
57 |
+
# 'action': response[1],
|
58 |
+
# 'function': {
|
59 |
+
# 'title': 'defaultnote',
|
60 |
+
# 'id': idval,
|
61 |
+
# 'type': 'Note',
|
62 |
+
# 'description': values[0],
|
63 |
+
# 'time': datetime.now().strftime("%d/%m/%Y"),
|
64 |
+
# 'mainTime': datetime.now().strftime("%I:%M %p"),
|
65 |
+
# 'complete': False,
|
66 |
+
# 'shared': [],
|
67 |
+
# 'sharedByMe': [],
|
68 |
+
# }
|
69 |
+
# })
|
70 |
+
|
71 |
+
|
72 |
import gradio as gr
|
73 |
import requests
|
74 |
import time
|