Skip to content

Commit f5461ce

Browse files
Added more details to chatbot
1 parent efe82ac commit f5461ce

File tree

3 files changed

+41
-87
lines changed

3 files changed

+41
-87
lines changed

Website/js/script.js

Lines changed: 20 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -188,12 +188,26 @@ async function fetchSubdirectoryCounts() {
188188
{ text: 'Hello! Welcome to Machine Learning Repos', type: 'bot' }
189189
];
190190

191-
// hardcoded questions and answers
192-
const questionsAndAnswers = [
193-
{ question: 'What is Machine Learning?', answer: 'Machine Learning is a field of AI that enables computers to learn from data without being explicitly programmed.' },
194-
{ question: 'Tell me about Machine Learning Repos.', answer: 'Machine Learning Repos is a curated collection of Machine Learning Repositories' },
195-
{ question: 'How do I contribute to the repository?', answer: 'You can contribute by forking the repository, making changes, and submitting a pull request. Learn more <a href="https://github.com/recodehive/machine-learning-repos/blob/main/Website/README.md" target="_blank">here</a>' },
196-
];
191+
// hardcoded questions and answers
192+
const questionsAndAnswers = [
193+
{ question: 'What is RecoderHive?',answer: 'RecodeHive is a community-driven platform offering curated machine learning repositories'},
194+
{ question: 'What is Machine Learning?', answer: 'Machine Learning is a field of AI that enables computers to learn from data without being explicitly programmed.' },
195+
{ question: 'Tell me about Machine Learning Repos.', answer: 'Machine Learning Repos is a curated collection of Machine Learning Repositories' },
196+
{ question: 'How do I contribute to the repository?', answer: 'You can contribute by forking the repository, making changes, and submitting a pull request. Learn more <a href="https://github.com/recodehive/machine-learning-repos/blob/main/Website/README.md" target="_blank">here</a>' },
197+
{ question: 'How many repositories are included in this collection?', answer: 'There are multiple repositories included, each covering various aspects of Machine Learning.' },
198+
{ question: 'What are the main topics covered by these repositories?', answer: 'The repositories cover topics like data preprocessing, model training, NLP, and more.' },
199+
{ question: 'Does the repository offer any courses?', answer: 'Yes, the repository provides links to courses related to Machine Learning.' },
200+
{ question: 'What programming languages are used in these repositories?', answer: 'The repositories utilize languages such as Python, R, HTML, CSS, JavaScript and others.' },
201+
{ question: 'Which frameworks are utilized in these repositories?', answer: 'Frameworks like TensorFlow, PyTorch, and Scikit-Learn are used.' },
202+
{ question: 'What is the most popular repository in the collection?', answer: 'The most popular repository is the "Awesome Machine Learning" collection.' },
203+
{ question: 'Are there any projects focusing on NLP in this collection?', answer: 'Yes, there are projects specifically focused on Natural Language Processing (NLP).' },
204+
{ question: 'How many topics are covered in the repository?', answer: 'The repository covers several key topics, including data science, deep learning, and more.' },
205+
{ question: 'Does the repository provide any tutorials?', answer: 'Yes, there are tutorials available that help users understand various machine learning concepts.' },
206+
{ question: 'What is the purpose of the repository?', answer: 'The repository aims to provide a comprehensive collection of resources and projects for learning and applying machine learning.' },
207+
{ question: 'Are there any datasets included in the repository?', answer: 'Yes, some repositories include datasets that can be used for training and testing machine learning models.' },
208+
{ question: 'How frequently is the repository updated?', answer: 'The repository is regularly updated with new content and improvements.' }
209+
];
210+
197211

198212

199213
function renderMessages() {
@@ -272,46 +286,3 @@ async function fetchSubdirectoryCounts() {
272286
toggleStatsSection();
273287
});
274288

275-
document.addEventListener("DOMContentLoaded", function() {
276-
fetchContributors();
277-
278-
function fetchContributors() {
279-
const repoOwner = 'recodehive'; // Replace with your repository owner
280-
const repoName = 'machine-learning-repos'; // Replace with your repository name
281-
const apiUrl = `https://api.github.com/repos/${repoOwner}/${repoName}/contributors`;
282-
283-
fetch(apiUrl)
284-
.then(response => response.json())
285-
.then(contributors => {
286-
const contributorsGrid = document.getElementById('contributors-grid');
287-
288-
contributors.forEach(contributor => {
289-
const contributorDiv = document.createElement('div');
290-
contributorDiv.className = 'contributor';
291-
292-
contributorDiv.innerHTML = `
293-
<img src="${contributor.avatar_url}" alt="${contributor.login}" class="contributor-image">
294-
<div class="contributor-info">
295-
<a href="${contributor.html_url}" target="_blank" class="contributor-github">GitHub Profile</a>
296-
</div>
297-
`;
298-
299-
contributorsGrid.appendChild(contributorDiv);
300-
});
301-
})
302-
.catch(error => {
303-
console.error('Error fetching contributors:', error);
304-
});
305-
}
306-
});
307-
308-
const toggleDarkModeButton = document.getElementById('toggle-dark-mode');
309-
const body = document.body;
310-
311-
toggleDarkModeButton.addEventListener('click', () => {
312-
body.classList.toggle('dark-mode');
313-
// Change icon based on dark mode status
314-
const icon = toggleDarkModeButton.querySelector('i');
315-
icon.classList.toggle('fa-moon');
316-
icon.classList.toggle('fa-sun');
317-
});

Website/package-lock.json

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Website/styles.css

Lines changed: 15 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ button#toggle-languages:hover {
523523

524524
.chatbot-header {
525525
background-color: #1a1a5e;
526-
color: white;
526+
color: rgb(255, 250, 250);
527527
padding: 15px;
528528
border-radius: 8px 8px 0 0;
529529
font-size: 16px;
@@ -565,18 +565,18 @@ button#toggle-languages:hover {
565565
}
566566

567567
.message.bot .message-text {
568-
background-color: #f1f1f1;
568+
background-color: #d1d0d0;
569569
}
570570

571571
.message.user .message-text {
572572
background-color: #1a1a5e;
573-
color: white;
573+
color: rgb(254, 252, 252);
574574
word-wrap: break-word;
575575
}
576576

577577
.chatbot-questions {
578578
padding: 15px;
579-
background-color: #f9f9f9;
579+
background-color: #f4f1f1;
580580
}
581581

582582
.chatbot-questions p {
@@ -593,29 +593,35 @@ button#toggle-languages:hover {
593593
}
594594

595595
.chatbot-questions li {
596-
background-color: #f1f1f1;
596+
background-color: #e8e5e5;
597597
padding: 10px 15px;
598598
border-radius: 6px;
599599
cursor: pointer;
600600
transition: background-color 0.3s ease;
601601
}
602+
#question-list {
603+
max-height: 200px;
604+
overflow-y: auto;
605+
padding: 10px;
606+
border: 1px solid #ccc;
607+
}
602608

603609
.chatbot-questions li:hover {
604610
background-color: #2f3a57;
605-
color: white;
611+
color: rgb(255, 255, 255);
606612
}
607613

608614
.chatbot-input-container {
609615
display: flex;
610616
padding: 15px;
611617
background-color: #f9f9f9;
612-
border-top: 1px solid #ddd;
618+
border-top: 1px solid #0f0a0a;
613619
}
614620

615621
.chatbot-input-container input {
616622
flex-grow: 1;
617623
padding: 8px;
618-
border: 1px solid #ddd;
624+
border: 1px solid #f8f2f2;
619625
border-radius: 8px;
620626
}
621627

@@ -624,7 +630,7 @@ button#toggle-languages:hover {
624630
margin-left: 10px;
625631
border: none;
626632
background-color: #2f3a57;
627-
color: white;
633+
color: rgb(252, 251, 251);
628634
border-radius: 8px;
629635
cursor: pointer;
630636
}
@@ -727,34 +733,6 @@ button#toggle-languages:hover {
727733
}
728734

729735

730-
/* Loading Animation CSS */
731-
.loading-container {
732-
position: fixed;
733-
top: 0;
734-
left: 0;
735-
width: 100%;
736-
height: 100%;
737-
display: flex;
738-
justify-content: center;
739-
align-items: center;
740-
background-color: rgba(255, 255, 255, 0.8); /* Slightly transparent background */
741-
z-index: 1000;
742-
}
743-
744-
.loader {
745-
border: 16px solid #f3f3f3; /* Light grey */
746-
border-top: 16px solid #3498db; /* Blue */
747-
border-radius: 50%;
748-
width: 120px;
749-
height: 120px;
750-
animation: spin 2s linear infinite;
751-
}
752-
753-
@keyframes spin {
754-
0% { transform: rotate(0deg); }
755-
100% { transform: rotate(360deg); }
756-
}
757-
758736
/* Dark Mode Styles */
759737
body.dark-mode {
760738
background-color: #121245;
@@ -825,4 +803,3 @@ body.dark-mode {
825803

826804

827805

828-

0 commit comments

Comments
 (0)