├── .gitignore
├── .idea
├── .gitignore
├── Jarvis-Assisant.iml
├── inspectionProfiles
│ ├── Project_Default.xml
│ └── profiles_settings.xml
├── misc.xml
├── modules.xml
├── vcs.xml
└── workspace.xml
├── README.md
├── configs
└── config.ini
├── requirements.txt
└── scripts
├── __pycache__
├── Jarvis.cpython-38.pyc
├── JarvisAssistant.cpython-38.pyc
└── main.cpython-38.pyc
├── configs
└── config.ini
├── main.py
└── main_advance_usages.py
/.gitignore:
--------------------------------------------------------------------------------
1 | venv/
2 | .idea/Jarvis-Assisant.iml
3 | .idea/misc.xml
4 | .idea/workspace.xml
5 | *.xml
6 | .idea/workspace.xml
7 | scripts/configs/JarvisAI-Voice.txt
8 | .idea/workspace.xml
9 | *.xml
10 | *.xml
11 |
--------------------------------------------------------------------------------
/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 | # Datasource local storage ignored files
5 | /../../../../:\Github\Jarvis-Assisant\.idea/dataSources/
6 | /dataSources.local.xml
7 | # Editor-based HTTP Client requests
8 | /httpRequests/
9 |
--------------------------------------------------------------------------------
/.idea/Jarvis-Assisant.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/inspectionProfiles/Project_Default.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | <<<<<<< Updated upstream
10 | =======
11 |
12 |
19 |
20 | >>>>>>> Stashed changes
21 |
22 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/.idea/inspectionProfiles/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/workspace.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 |
229 | 1610185292969
230 |
231 |
232 | 1610185292969
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 |
246 |
247 |
248 |
249 |
250 |
251 |
252 |
253 |
254 |
255 |
256 |
257 |
258 |
259 |
260 |
261 |
262 |
263 |
264 |
265 |
272 |
273 |
274 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Read First-
2 |
3 | - This is the Example script of how to use Python's Library JarvisAI (https://pypi.org/project/JarvisAI)
4 | - This script is always uses the latest version of JarvisAI with latest example.
5 |
6 | ## Getting started-
7 | 1. Clone the repo.
8 | 2. `pip install -r requirements.txt` to install all requirements, some of the things you may need to install manually so check requirements.txt file.
9 | If anything is failing (or giving error) then skip that package or try to install that manually by searching on Google about that package. It's not a big deal.
10 | 3. Run `main.py` file. `python main.py`
11 | 4. Installation may take time because it uses heavy libraries like Tensorflow and Pytorch with some of the deep learning models. So, if you are limited by data (bandwidth) then this is not for you. *The first time installation will take some time and lots of data.*
12 | 5. Watch *tutorial* and read *usages* for more information from below section.
13 |
14 | ## Usages-
15 | Read Here: https://github.com/Dipeshpal/Jarvis_AI
16 |
17 | ## Tutorial on YouTube-
18 |
19 | It is recommended to watch both of the below Tutorial because in both of the video I have added some updates and extra functionality.
20 |
21 | ### Tutorial 2 (Latest)-
22 |
23 | [](https://www.youtube.com/embed/C-sKlSULLrI "Tutorial 2")
24 |
25 | ### Tutorial 1 (Old)-
26 |
27 | [](https://www.youtube.com/embed/LliTjuxDw_o "Tutorial 2")
28 |
29 | ## Found Bugs?
30 | * If bug is in JarvisAI library then raise issue here: https://github.com/Dipeshpal/Jarvis_AI/issues
31 | * If bug is in this example script then raise issue here: https://github.com/Dipeshpal/Jarvis-Assisant/issues
32 |
33 | ## Suggestion-
34 | * Want more features / Ideas/ Discussions etc.
35 | Add here: https://github.com/Dipeshpal/Jarvis_AI/discussions
36 |
37 | ## Note-
38 | * Add proper notes, guides, **traceback**, steps and description if you want to suggest something or raise issue.
39 | * Check already exist issues first.
40 |
41 | ## Contact me-
42 | * https://www.instagram.com/dipesh_pal17
43 | * https://www.youtube.com/techportofficial
44 | * dipeshpal17@gmail.com
45 |
46 |
--------------------------------------------------------------------------------
/configs/config.ini:
--------------------------------------------------------------------------------
1 | [default]
2 | bot_name = jarvis
3 | user_name = Dipesh
4 | photos = None
5 |
6 |
--------------------------------------------------------------------------------
/requirements.txt:
--------------------------------------------------------------------------------
1 | absl-py==1.0.0
2 | appdirs==1.4.4
3 | astunparse==1.6.3
4 | attrs==21.2.0
5 | audioread==2.1.9
6 | auto-face-recognition==0.0.2
7 | beautifulsoup4==4.9.3
8 | blis==0.7.5
9 | cachetools==4.2.4
10 | catalogue==2.0.6
11 | certifi==2021.10.8
12 | cffi==1.15.0
13 | chardet==4.0.0
14 | charset-normalizer==2.0.9
15 | click==8.0.3
16 | colorama==0.4.4
17 | comtypes==1.1.10
18 | cvzone==1.1.1
19 | cycler==0.11.0
20 | cymem==2.0.6
21 | decorator==5.1.0
22 | docopt==0.6.2
23 | en-core-web-sm @ https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.2.0/en_core_web_sm-3.2.0-py3-none-any.whl
24 | filelock==3.4.0
25 | flatbuffers==2.0
26 | fonttools==4.28.5
27 | gast==0.4.0
28 | google-auth==2.3.3
29 | google-auth-oauthlib==0.4.6
30 | google-pasta==0.2.0
31 | googlesearch-python==1.0.1
32 | grpcio==1.43.0
33 | gTTS==2.2.1
34 | h5py==3.6.0
35 | idna==2.10
36 | importlib-metadata==4.9.0
37 | JarvisAI==3.6
38 | Jinja2==3.0.3
39 | joblib==1.1.0
40 | Js2Py==0.71
41 | keras==2.7.0
42 | Keras-Preprocessing==1.1.2
43 | kiwisolver==1.3.2
44 | langcodes==3.3.0
45 | lazyme==0.0.23
46 | libclang==12.0.0
47 | librosa==0.8.0
48 | llvmlite==0.37.0
49 | lxml==4.6.1
50 | Markdown==3.3.6
51 | MarkupSafe==2.0.1
52 | matplotlib==3.5.1
53 | mediapipe==0.8.8
54 | murmurhash==1.0.6
55 | numba==0.54.1
56 | numpy==1.20.3
57 | oauthlib==3.1.1
58 | opencv-contrib-python==4.5.2.52
59 | opencv-python==4.5.2.52
60 | opt-einsum==3.3.0
61 | packaging==21.3
62 | pathy==0.6.1
63 | Pillow==8.4.0
64 | pipwin==0.5.0
65 | playsound==1.2.2
66 | pooch==1.5.2
67 | preshed==3.0.6
68 | protobuf==3.19.1
69 | pyasn1==0.4.8
70 | pyasn1-modules==0.2.8
71 | PyAudio @ file:///C:/Users/dipes/pipwin/PyAudio-0.2.11-cp39-cp39-win_amd64.whl
72 | pycparser==2.21
73 | pydantic==1.8.2
74 | pyjokes==0.6.0
75 | pyjsparser==2.7.1
76 | pyparsing==3.0.6
77 | pypiwin32==223
78 | PyPrind==2.11.3
79 | pyserial==3.5
80 | pySmartDL==1.3.4
81 | python-dateutil==2.8.2
82 | pyttsx3==2.90
83 | pytz-deprecation-shim==0.1.0.post0
84 | pywin32==302
85 | regex==2021.11.10
86 | requests==2.25.1
87 | requests-oauthlib==1.3.0
88 | resampy==0.2.2
89 | rsa==4.8
90 | sacremoses==0.0.46
91 | scikit-learn==1.0.1
92 | scipy==1.7.3
93 | six==1.16.0
94 | smart-open==5.2.1
95 | SoundFile==0.10.3.post1
96 | soupsieve==2.3.1
97 | spacy==3.2.1
98 | spacy-legacy==3.0.8
99 | spacy-loggers==1.0.1
100 | SpeechRecognition==3.8.1
101 | srsly==2.4.2
102 | tensorboard==2.7.0
103 | tensorboard-data-server==0.6.1
104 | tensorboard-plugin-wit==1.8.0
105 | tensorflow==2.7.0
106 | tensorflow-estimator==2.7.0
107 | tensorflow-io-gcs-filesystem==0.23.1
108 | termcolor==1.1.0
109 | thinc==8.0.13
110 | threadpoolctl==3.0.0
111 | tokenizers==0.10.3
112 | torch==1.7.1
113 | tqdm==4.62.3
114 | transformers==4.3.2
115 | typer==0.4.0
116 | typing_extensions==4.0.1
117 | tzdata==2021.5
118 | tzlocal==4.1
119 | urllib3==1.26.7
120 | wasabi==0.9.0
121 | Werkzeug==2.0.2
122 | wikipedia==1.4.0
123 | wrapt==1.13.3
124 | zipp==3.6.0
125 |
--------------------------------------------------------------------------------
/scripts/__pycache__/Jarvis.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dipeshpal/Jarvis-Assisant/4a95a4bd9c3a592c1de61bca931b70072a3537f4/scripts/__pycache__/Jarvis.cpython-38.pyc
--------------------------------------------------------------------------------
/scripts/__pycache__/JarvisAssistant.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dipeshpal/Jarvis-Assisant/4a95a4bd9c3a592c1de61bca931b70072a3537f4/scripts/__pycache__/JarvisAssistant.cpython-38.pyc
--------------------------------------------------------------------------------
/scripts/__pycache__/main.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dipeshpal/Jarvis-Assisant/4a95a4bd9c3a592c1de61bca931b70072a3537f4/scripts/__pycache__/main.cpython-38.pyc
--------------------------------------------------------------------------------
/scripts/configs/config.ini:
--------------------------------------------------------------------------------
1 | [default]
2 | bot_name = jarvis
3 | user_name = Dipesh
4 | photos = None
5 |
6 |
--------------------------------------------------------------------------------
/scripts/main.py:
--------------------------------------------------------------------------------
1 | import JarvisAI
2 | import os
3 | import re
4 | import pprint
5 | import random
6 | import warnings
7 |
8 | warnings.filterwarnings("ignore")
9 | warnings.warn("second example of warning!")
10 |
11 | obj = JarvisAI.JarvisAssistant(sync=True, token='71dd94xsxsxse48471ec7af2a733acfb', disable_msg=False,
12 | load_chatbot_model=True, high_accuracy_chatbot_model=False,
13 | chatbot_large=True, backend_tts_api='pyttsx3')
14 |
15 |
16 | def t2s(text):
17 | obj.text2speech(text)
18 |
19 |
20 | def start():
21 | while True:
22 | print("Say your AI name to activate")
23 | status, command = obj.hot_word_detect()
24 | print(status, command)
25 | if status:
26 | while True:
27 | # use any one of them
28 | print("Continue listening, say- 'stop listening to stop continue listening'")
29 | res = obj.mic_input()
30 | # res = obj.mic_input_ai(debug=True)
31 | res = res.lower()
32 | print("You said: " + res)
33 |
34 | if re.search("jokes|joke|Jokes|Joke", res):
35 | joke_ = obj.tell_me_joke('en', 'neutral')
36 | print(joke_)
37 | t2s(joke_)
38 |
39 | elif re.search('setup|set up', res):
40 | setup = obj.setup()
41 | print(setup)
42 |
43 | elif re.search('google photos', res):
44 | photos = obj.show_google_photos()
45 | print(photos)
46 |
47 | elif re.search('local photos', res):
48 | photos = obj.show_me_my_images()
49 | print(photos)
50 |
51 | elif re.search('weather|temperature', res):
52 | # city = res.split(' ')[-1]
53 | # weather_res = obj.weather(city=city)
54 | weather_res = obj.get_weather(res)
55 | print(weather_res)
56 | t2s(weather_res)
57 |
58 | elif re.search('news', res):
59 | news_res = obj.news()
60 | pprint.pprint(news_res)
61 | t2s(f"I have found {len(news_res)} news. You can read it. Let me tell you first 2 of them")
62 | t2s(news_res[0])
63 | t2s(news_res[1])
64 |
65 | elif re.search('tell me about', res):
66 | topic = res[14:]
67 | wiki_res = obj.tell_me(topic)
68 | print(wiki_res)
69 | t2s(wiki_res)
70 |
71 | elif re.search('date', res):
72 | date = obj.tell_me_date()
73 | print(date)
74 | print(t2s(date))
75 |
76 | elif re.search('time', res):
77 | time = obj.tell_me_time()
78 | print(time)
79 | t2s(time)
80 |
81 | elif re.search('open', res):
82 | domain = res.split(' ')[-1]
83 | open_result = obj.website_opener(domain)
84 | print(open_result)
85 |
86 | elif re.search('launch', res):
87 | dict_app = {
88 | 'chrome': 'C:\Program Files (x86)\Google\Chrome\Application\chrome.exe',
89 | 'epic games': 'C:\Program Files (x86)\Epic Games\Launcher\Portal\Binaries\Win32\EpicGamesLauncher.exe'
90 | }
91 |
92 | app = res.split(' ', 1)[1]
93 | path = dict_app.get(app)
94 | if path is None:
95 | t2s('Application path not found')
96 | print('Application path not found')
97 | else:
98 | t2s('Launching: ' + app)
99 | obj.launch_any_app(path_of_app=path)
100 |
101 | elif re.search('hello|hi', res):
102 | print('Hi')
103 | t2s('Hi')
104 |
105 | elif re.search('how are you', res):
106 | li = ['good', 'fine', 'great']
107 | response = random.choice(li)
108 | print(f"I am {response}")
109 | t2s(f"I am {response}")
110 |
111 | elif re.search('your name|who are you', res):
112 | print("I am your personal assistant")
113 | t2s("I am your personal assistant")
114 |
115 | elif re.search('what can you do', res):
116 | li_commands = {
117 | "open websites": "Example: 'open youtube.com",
118 | "time": "Example: 'what time it is?'",
119 | "date": "Example: 'what date it is?'",
120 | "launch applications": "Example: 'launch chrome'",
121 | "tell me": "Example: 'tell me about India'",
122 | "weather": "Example: 'what weather/temperature in Mumbai?'",
123 | "news": "Example: 'news for today' ",
124 | }
125 | ans = """I can do lots of things, for example you can ask me time, date, weather in your city,
126 | I can open websites for you, launch application and more. See the list of commands-"""
127 | print(ans)
128 | pprint.pprint(li_commands)
129 | t2s(ans)
130 | elif re.search('tech news', res):
131 | obj.show_me_some_tech_news()
132 |
133 | elif re.search('tech videos', res):
134 | obj.show_me_some_tech_videos()
135 |
136 | elif re.search(r"^add *.+ list$", res):
137 | obj.create_new_list(res)
138 |
139 | elif re.search(r"^show *.+ list$", res):
140 | obj.show_me_my_list()
141 |
142 | elif re.search(r"^delete *.+ list$", res):
143 | obj.delete_particular_list(res)
144 |
145 | elif re.search("stop listening|stop", res):
146 | break
147 |
148 | else:
149 | chatbot_response = obj.chatbot_base(input_text=res) # comment this line if you want to use chatbot large
150 | # chatbot_response = obj.chatbot_large(input_text=res) # uncomment this line to use large model for heavy/complex tasks
151 |
152 | print(chatbot_response)
153 | t2s(chatbot_response)
154 | else:
155 | continue
156 |
157 |
158 | if __name__ == "__main__":
159 | if not os.path.exists("configs/config.ini"):
160 | print(os.listdir())
161 | res = obj.setup()
162 | if res:
163 | print("Settings Saved. Restart your Assistant")
164 | else:
165 | start()
166 |
--------------------------------------------------------------------------------
/scripts/main_advance_usages.py:
--------------------------------------------------------------------------------
1 | import JarvisAI
2 | import os
3 | import re
4 | import pprint
5 | import random
6 | import warnings
7 |
8 | warnings.filterwarnings("ignore")
9 | warnings.warn("second example of warning!")
10 |
11 |
12 | obj = JarvisAI.JarvisAssistant(sync=True, token='b848560382ba0d15819bc2f44ae2eb', disable_msg=False,
13 | load_chatbot_model=False, high_accuracy_chatbot_model=False,
14 | chatbot_large=False, backend_tts_api='pyttsx3')
15 |
16 |
17 | def t2s(text):
18 | obj.text2speech(text)
19 |
20 |
21 | def start():
22 | while True:
23 | # use any one of them
24 | print("Continue listening, \nsay- 'stop listening to stop continue listening'")
25 | res = obj.mic_input()
26 | # res = obj.mic_input_ai(debug=True)
27 | print(res)
28 |
29 | if re.search("jokes|joke|Jokes|Joke", res):
30 | joke_ = obj.tell_me_joke('en', 'neutral')
31 | print(joke_)
32 | t2s(joke_)
33 |
34 | if re.search('setup|set up', res):
35 | setup = obj.setup()
36 | print(setup)
37 |
38 | if re.search('google photos', res):
39 | photos = obj.show_google_photos()
40 | print(photos)
41 |
42 | if re.search('local photos', res):
43 | photos = obj.show_me_my_images()
44 | print(photos)
45 |
46 | if re.search('weather|temperature', res):
47 | city = res.split(' ')[-1]
48 | weather_res = obj.weather(city=city)
49 | print(weather_res)
50 | t2s(weather_res)
51 |
52 | if re.search('news', res):
53 | news_res = obj.news()
54 | pprint.pprint(news_res)
55 | t2s(f"I have found {len(news_res)} news. You can read it. Let me tell you first 2 of them")
56 | t2s(news_res[0])
57 | t2s(news_res[1])
58 |
59 | if re.search('tell me about', res):
60 | topic = res[14:]
61 | wiki_res = obj.tell_me(topic, sentences=1)
62 | print(wiki_res)
63 | t2s(wiki_res)
64 |
65 | if re.search('date', res):
66 | date = obj.tell_me_date()
67 | print(date)
68 | print(t2s(date))
69 |
70 | if re.search('time', res):
71 | time = obj.tell_me_time()
72 | print(time)
73 | t2s(time)
74 |
75 | if re.search('open', res):
76 | domain = res.split(' ')[-1]
77 | open_result = obj.website_opener(domain)
78 | print(open_result)
79 |
80 | if re.search('launch', res):
81 | dict_app = {
82 | 'chrome': 'C:\Program Files (x86)\Google\Chrome\Application\chrome.exe',
83 | 'epic games': 'C:\Program Files (x86)\Epic Games\Launcher\Portal\Binaries\Win32\EpicGamesLauncher.exe'
84 | }
85 |
86 | app = res.split(' ', 1)[1]
87 | path = dict_app.get(app)
88 | if path is None:
89 | t2s('Application path not found')
90 | print('Application path not found')
91 | else:
92 | t2s('Launching: ' + app)
93 | obj.launch_any_app(path_of_app=path)
94 |
95 | if re.search('hello|hi', res):
96 | print('Hi')
97 | t2s('Hi')
98 |
99 | if re.search('how are you', res):
100 | li = ['good', 'fine', 'great']
101 | response = random.choice(li)
102 | print(f"I am {response}")
103 | t2s(f"I am {response}")
104 |
105 | if re.search('your name|who are you', res):
106 | print("I am your personal assistant")
107 | t2s("I am your personal assistant")
108 |
109 | if re.search('what can you do', res):
110 | li_commands = {
111 | "open websites": "Example: 'open youtube.com",
112 | "time": "Example: 'what time it is?'",
113 | "date": "Example: 'what date it is?'",
114 | "launch applications": "Example: 'launch chrome'",
115 | "tell me": "Example: 'tell me about India'",
116 | "weather": "Example: 'what weather/temperature in Mumbai?'",
117 | "news": "Example: 'news for today' ",
118 | }
119 | ans = """I can do lots of things, for example you can ask me time, date, weather in your city,
120 | I can open websites for you, launch application and more. See the list of commands-"""
121 | print(ans)
122 | pprint.pprint(li_commands)
123 | t2s(ans)
124 |
125 | if re.search("stop listening|stop", res):
126 | break
127 | else:
128 | chatbot_response = obj.chatbot_base(input_text=res)
129 | print(chatbot_response)
130 | t2s(chatbot_response)
131 |
132 |
133 | if __name__ == "__main__":
134 | if not os.path.exists("configs/config.ini"):
135 | res = obj.setup()
136 | if res:
137 | print("Settings Saved. Restart your Assistant")
138 | else:
139 | obj.jarvisai_configure_hand_detector(camera=0, detectionCon=0.7, maxHands=2,
140 | cam_display=True, cam_height=720, cam_width=1280)
141 | while True:
142 | try:
143 | fingers, hand_type, cv2, img, cap = obj.jarvisai_detect_hands()
144 | # print(fingers, hand_type)
145 | cv2.putText(img, 'Up four fingers of right hand to wake up assistant', (50, 200),
146 | cv2.FONT_HERSHEY_PLAIN, 2, (0, 255, 0), 2)
147 | cv2.imshow("img", img)
148 | cv2.waitKey(1)
149 | if fingers == [1, 1, 1, 1, 0] and hand_type == 'Right':
150 | cv2.destroyAllWindows()
151 | cap.release()
152 | start()
153 | if fingers == [0, 1, 1, 1, 1] and hand_type == 'Left':
154 | cv2.destroyAllWindows()
155 | cap.release()
156 | city = "Indore"
157 | weather_res = obj.weather(city=city)
158 | print(weather_res)
159 | t2s(weather_res)
160 | except:
161 | obj.jarvisai_configure_hand_detector(camera=0, detectionCon=0.7, maxHands=2,
162 | cam_display=True, cam_height=720, cam_width=1280)
163 |
--------------------------------------------------------------------------------