Skip to content

Commit f9990c8

Browse files
authored
Merge pull request #1179 from UppuluriKalyani/main
Added More Details to Chatbot
2 parents cb8c4f4 + 71ce683 commit f9990c8

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
@@ -546,7 +546,7 @@ button#toggle-languages:hover {
546546

547547
.chatbot-header {
548548
background-color: #1a1a5e;
549-
color: white;
549+
color: rgb(255, 250, 250);
550550
padding: 15px;
551551
border-radius: 8px 8px 0 0;
552552
font-size: 16px;
@@ -588,18 +588,18 @@ button#toggle-languages:hover {
588588
}
589589

590590
.message.bot .message-text {
591-
background-color: #f1f1f1;
591+
background-color: #d1d0d0;
592592
}
593593

594594
.message.user .message-text {
595595
background-color: #1a1a5e;
596-
color: white;
596+
color: rgb(254, 252, 252);
597597
word-wrap: break-word;
598598
}
599599

600600
.chatbot-questions {
601601
padding: 15px;
602-
background-color: #f9f9f9;
602+
background-color: #f4f1f1;
603603
}
604604

605605
.chatbot-questions p {
@@ -616,29 +616,35 @@ button#toggle-languages:hover {
616616
}
617617

618618
.chatbot-questions li {
619-
background-color: #f1f1f1;
619+
background-color: #e8e5e5;
620620
padding: 10px 15px;
621621
border-radius: 6px;
622622
cursor: pointer;
623623
transition: background-color 0.3s ease;
624624
}
625+
#question-list {
626+
max-height: 200px; /* Adjust height as needed */
627+
overflow-y: auto; /* Enable vertical scrolling */
628+
padding: 10px;
629+
border: 1px solid #ccc;
630+
}
625631

626632
.chatbot-questions li:hover {
627633
background-color: #2f3a57;
628-
color: white;
634+
color: rgb(255, 255, 255);
629635
}
630636

631637
.chatbot-input-container {
632638
display: flex;
633639
padding: 15px;
634640
background-color: #f9f9f9;
635-
border-top: 1px solid #ddd;
641+
border-top: 1px solid #0f0a0a;
636642
}
637643

638644
.chatbot-input-container input {
639645
flex-grow: 1;
640646
padding: 8px;
641-
border: 1px solid #ddd;
647+
border: 1px solid #f8f2f2;
642648
border-radius: 8px;
643649
}
644650

@@ -647,7 +653,7 @@ button#toggle-languages:hover {
647653
margin-left: 10px;
648654
border: none;
649655
background-color: #2f3a57;
650-
color: white;
656+
color: rgb(252, 251, 251);
651657
border-radius: 8px;
652658
cursor: pointer;
653659
}
@@ -750,34 +756,6 @@ button#toggle-languages:hover {
750756
}
751757

752758

753-
/* Loading Animation CSS */
754-
.loading-container {
755-
position: fixed;
756-
top: 0;
757-
left: 0;
758-
width: 100%;
759-
height: 100%;
760-
display: flex;
761-
justify-content: center;
762-
align-items: center;
763-
background-color: rgba(255, 255, 255, 0.8); /* Slightly transparent background */
764-
z-index: 1000;
765-
}
766-
767-
.loader {
768-
border: 16px solid #f3f3f3; /* Light grey */
769-
border-top: 16px solid #3498db; /* Blue */
770-
border-radius: 50%;
771-
width: 120px;
772-
height: 120px;
773-
animation: spin 2s linear infinite;
774-
}
775-
776-
@keyframes spin {
777-
0% { transform: rotate(0deg); }
778-
100% { transform: rotate(360deg); }
779-
}
780-
781759
/* Dark Mode Styles */
782760
body.dark-mode {
783761
background-color: #121245;
@@ -848,4 +826,3 @@ body.dark-mode {
848826

849827

850828

851-

0 commit comments

Comments
 (0)