+ A G R O P R O
+I'm a Virtual Assistant how can i help you
+From 99e51eca66de5dcc39abd6231d3a6875eaee5004 Mon Sep 17 00:00:00 2001 From: manan1051 <112331786+manan1051@users.noreply.github.com> Date: Sun, 4 Dec 2022 11:42:16 +0530 Subject: [PATCH] Add files via upload --- CardSearching.html | 123 ++++++++++++++++++++++++ Consumer.css | 38 ++++++++ Consumer.html | 67 +++++++++++++ Consumer.js | 100 ++++++++++++++++++++ README.md | 17 +++- app.js | 127 +++++++++++++++++++++++++ bot.css | 119 +++++++++++++++++++++++ bot.html | 56 +++++++++++ class_indices.json | 1 + common.jpeg | Bin 0 -> 403343 bytes demo.gif | Bin 0 -> 1815708 bytes download.png | Bin 0 -> 6820 bytes download1.png | Bin 0 -> 57258 bytes download2.jfif | Bin 0 -> 18078 bytes download3.jpg | Bin 0 -> 27644 bytes download4.jpg | Bin 0 -> 19382 bytes download5.jpg | Bin 0 -> 21440 bytes gif.gif | Bin 0 -> 1008024 bytes index.html | 80 ++++++++++++++++ map.css | 83 ++++++++++++++++ map.html | 91 ++++++++++++++++++ meat.jpeg | Bin 0 -> 1124724 bytes onion.jpeg | Bin 0 -> 25367 bytes organic.jpeg | Bin 0 -> 73595 bytes rice.jpeg | Bin 0 -> 203626 bytes script.js | 105 +++++++++++++++++++++ script2.js | 95 +++++++++++++++++++ style.css | 229 +++++++++++++++++++++++++++++++++++++++++++++ wheat.jpeg | Bin 0 -> 255556 bytes 29 files changed, 1330 insertions(+), 1 deletion(-) create mode 100644 CardSearching.html create mode 100644 Consumer.css create mode 100644 Consumer.html create mode 100644 Consumer.js create mode 100644 app.js create mode 100644 bot.css create mode 100644 bot.html create mode 100644 class_indices.json create mode 100644 common.jpeg create mode 100644 demo.gif create mode 100644 download.png create mode 100644 download1.png create mode 100644 download2.jfif create mode 100644 download3.jpg create mode 100644 download4.jpg create mode 100644 download5.jpg create mode 100644 gif.gif create mode 100644 index.html create mode 100644 map.css create mode 100644 map.html create mode 100644 meat.jpeg create mode 100644 onion.jpeg create mode 100644 organic.jpeg create mode 100644 rice.jpeg create mode 100644 script.js create mode 100644 script2.js create mode 100644 style.css create mode 100644 wheat.jpeg diff --git a/CardSearching.html b/CardSearching.html new file mode 100644 index 0000000..e929a60 --- /dev/null +++ b/CardSearching.html @@ -0,0 +1,123 @@ + + + +
+ + + + +${curarra[i].desc}
+ + +
+
+You can access the project online HERE
+ diff --git a/app.js b/app.js new file mode 100644 index 0000000..a549010 --- /dev/null +++ b/app.js @@ -0,0 +1,127 @@ +const btn = document.querySelector('.talk'); +const content = document.querySelector('.content'); + +function speak(sentence) { + const text_speak = new SpeechSynthesisUtterance(sentence); + + text_speak.rate = 1; + text_speak.pitch = 1; + + window.speechSynthesis.speak(text_speak); +} + +function wishMe() { + var day = new Date(); + var hr = day.getHours(); + + if(hr >= 0 && hr < 12) { + speak("Good Morning Boss"); + } + + else if(hr == 12) { + speak("Good noon Boss"); + } + + else if(hr > 12 && hr <= 17) { + speak("Good Afternoon Boss"); + } + + else { + speak("Good Evening Boss"); + } +} + +window.addEventListener('load', ()=>{ + speak("Activating Inertia"); + speak("Going online"); + wishMe(); +}) + +const SpeechRecognition = window.SpeechRecognition || window.webkitSpeechRecognition; +const recognition = new SpeechRecognition(); + +recognition.onresult = (event) => { + const current = event.resultIndex; + const transcript = event.results[current][0].transcript; + content.textContent = transcript; + speakThis(transcript.toLowerCase()); +} + +btn.addEventListener('click', ()=>{ + recognition.start(); +}) + +function speakThis(message) { + const speech = new SpeechSynthesisUtterance(); + + speech.text = "I did not understand what you said please try again"; + + if(message.includes('hey') || message.includes('hello')) { + const finalText = "Hello Boss"; + speech.text = finalText; + } + + else if(message.includes('TOMATO BLIGHT') || message.includes('potato_early_blight')) { + const finalText = "EK AADMI"; + speech.text = finalText; + } + + else if(message.includes('name')) { + const finalText = "My name is Inertia"; + speech.text = finalText; + } + + else if(message.includes('open google')) { + window.open("https://google.com", "_blank"); + const finalText = "Opening Google"; + speech.text = finalText; + } + + else if(message.includes('open instagram')) { + window.open("https://instagram.com", "_blank"); + const finalText = "Opening instagram"; + speech.text = finalText; + } + + else if(message.includes('what is') || message.includes('who is') || message.includes('what are')) { + window.open(`https://www.google.com/search?q=${message.replace(" ", "+")}`, "_blank"); + const finalText = "This is what i found on internet regarding " + message; + speech.text = finalText; + } + + else if(message.includes('wikipedia')) { + window.open(`https://en.wikipedia.org/wiki/${message.replace("wikipedia", "")}`, "_blank"); + const finalText = "This is what i found on wikipedia regarding " + message; + speech.text = finalText; + } + + else if(message.includes('time')) { + const time = new Date().toLocaleString(undefined, {hour: "numeric", minute: "numeric"}) + const finalText = time; + speech.text = finalText; + } + + else if(message.includes('date')) { + const date = new Date().toLocaleString(undefined, {month: "short", day: "numeric"}) + const finalText = date; + speech.text = finalText; + } + + else if(message.includes('calculator')) { + window.open('Calculator:///') + const finalText = "Opening Calculator"; + speech.text = finalText; + } + + else { + window.open(`https://www.google.com/search?q=${message.replace(" ", "+")}`, "_blank"); + const finalText = "I found some information for " + message + " on google"; + speech.text = finalText; + } + + speech.volume = 1; + speech.pitch = 1; + speech.rate = 1; + + window.speechSynthesis.speak(speech); +} \ No newline at end of file diff --git a/bot.css b/bot.css new file mode 100644 index 0000000..4c0c6e2 --- /dev/null +++ b/bot.css @@ -0,0 +1,119 @@ +@import url("https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@100;200;300;400;500;600;700&display=swap"); + +* { + margin: 0; + padding: 0; + box-sizing: border-box; + font-family: "Roboto Mono", monospace; +} + +.navbar ul { + list-style: none; + padding-top: 6px; +} + +.navbar ul li { + background: none; + border: 2px solid rgba(59, 233, 10, 0.258); + width: 120px; + height: 40px; + text-align: center; + float: right; + position: relative; + line-height: 35px; + border-radius: 10px; + padding-top: 0px; +} + +.navbar ul li a { + text-decoration: none; + color: rgb(3, 2, 2); + font-size: 13px; + display: block; + border-radius: 10px; +} + +.navbar ul li a:hover { + background-color: none; + color: rgb(26, 255, 0); + border-radius: 10px; +} + +.navbar ul ul { + display: none; + font-size: 18px; + position: absolute; +} +.main { + min-height: 100vh; + position: relative; + width: 100%; + background: #000; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; +} + +.main .image-container { + padding: 10px; +} + +.main .image-container .image { + width: 100%; + display: flex; + align-items: center; + justify-content: center; +} + +.main .image-container .image img { + width: 170px; + align-items: center; +} + +.main .image-container h1 { + color: #00bcd4; + text-align: center; + margin-bottom: 10px; + font-size: 40px; +} + +.main .image-container p { + color: #324042; + text-align: center; + margin-bottom: 40px; +} + +.main .input { + display: flex; + justify-content: center; + align-items: center; + width: 40vw; + height: 50px; + border-radius: 20px; + background: rgb(202 253 255 / 50%); +} + +.main .input .talk { + background: transparent; + outline: none; + border: none; + width: 50px; + height: 50px; + display: flex; + justify-content: center; + align-items: center; + font-size: 15px; + cursor: pointer; +} + +.main .input .talk i { + font-size: 20px; + color: #aed0d0; +} + +.main .input .content { + color: #aed0d0; + font-size: 15px; + margin-right: 20px; +} \ No newline at end of file diff --git a/bot.html b/bot.html new file mode 100644 index 0000000..1f7fb92 --- /dev/null +++ b/bot.html @@ -0,0 +1,56 @@ + + + + + + + +