Spaces:
Sleeping
Sleeping
Upload 3 files
Browse files- analytics.csv +112 -0
- app.py +74 -0
- requirements.txt +0 -0
analytics.csv
ADDED
@@ -0,0 +1,112 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Title,Description,Link,Lessons,Price,Review Count
|
2 |
+
Framework to Choose the Right LLM for your Business,"All Courses,
|
3 |
+
|
4 |
+
|
5 |
+
|
6 |
+
Generative AI",https://courses.analyticsvidhya.com/courses/choosing-the-right-LLM-for-your-business,6 Lessons,Free,(1)
|
7 |
+
Improving Real World RAG Systems: Key Challenges & Practical Solutions,"All Courses,
|
8 |
+
|
9 |
+
|
10 |
+
|
11 |
+
Generative AI",https://courses.analyticsvidhya.com/courses/improving-real-world-rag-systems-key-challenges,12 Lessons,Free,(4)
|
12 |
+
Building Smarter LLMs with Mamba and State Space Model,All Courses,https://courses.analyticsvidhya.com/courses/building-smarter-llms-with-mamba-and-state-space-model,14 Lessons,Free,No reviews
|
13 |
+
Generative AI - A Way of Life - Free Course,"All Courses,
|
14 |
+
|
15 |
+
|
16 |
+
|
17 |
+
Generative AI",https://courses.analyticsvidhya.com/courses/genai-a-way-of-life,31 Lessons,Free,(10)
|
18 |
+
Getting Started with Large Language Models,"All Courses,
|
19 |
+
|
20 |
+
|
21 |
+
|
22 |
+
Generative AI",https://courses.analyticsvidhya.com/courses/getting-started-with-llms,18 Lessons,Free,(22)
|
23 |
+
Building LLM Applications using Prompt Engineering - Free Course,"All Courses,
|
24 |
+
|
25 |
+
|
26 |
+
|
27 |
+
Generative AI",https://courses.analyticsvidhya.com/courses/building-llm-applications-using-prompt-engineering-free,18 Lessons,Free,(8)
|
28 |
+
MidJourney: From Inspiration to Implementation - Free Course,"All Courses,
|
29 |
+
|
30 |
+
|
31 |
+
|
32 |
+
Generative AI",https://courses.analyticsvidhya.com/courses/midjourney_from_inspiration_to_implementation,5 Lessons,Free,(2)
|
33 |
+
Building Your first RAG System using LlamaIndex - Free Course,"All Courses,
|
34 |
+
|
35 |
+
|
36 |
+
|
37 |
+
Generative AI",https://courses.analyticsvidhya.com/courses/building-first-rag-systems-using-llamaindex,12 Lessons,Free,(9)
|
38 |
+
Exploring Stability.AI - Free Course,"All Courses,
|
39 |
+
|
40 |
+
|
41 |
+
|
42 |
+
Generative AI",https://courses.analyticsvidhya.com/courses/exploring-stability-ai,7 Lessons,Free,(2)
|
43 |
+
No title available,No description available,https://courses.analyticsvidhya.comNo link,No lesson count,No price available,No reviews
|
44 |
+
Introduction to AI & ML,All Courses,https://courses.analyticsvidhya.com/courses/introduction-to-ai-ml,17 Lessons,Free,(190)
|
45 |
+
Introduction to Python,"All Courses,
|
46 |
+
|
47 |
+
|
48 |
+
|
49 |
+
Tools,
|
50 |
+
|
51 |
+
|
52 |
+
|
53 |
+
Business Analytics Courses",https://courses.analyticsvidhya.com/courses/introduction-to-data-science,69 Lessons,Free,(1580)
|
54 |
+
Machine Learning Certification Course for Beginners,All Courses,https://courses.analyticsvidhya.com/courses/Machine-Learning-Certification-Course-for-Beginners,261 Lessons,Free,(533)
|
55 |
+
The Working of Neural Networks - Free Course,All Courses,https://courses.analyticsvidhya.com/courses/The%20Working%20of%20Neural%20Networks,11 Lessons,Free,No reviews
|
56 |
+
Understanding Linear Regression - Free Course,All Courses,https://courses.analyticsvidhya.com/courses/free-understanding-linear-regression,10 Lessons,Free,(3)
|
57 |
+
Building a Text Classification Model with Natural Language Processing - Free Course,All Courses,https://courses.analyticsvidhya.com/courses/free-building-textclassification-natural-language-processing,16 Lessons,Free,(1)
|
58 |
+
The A to Z of Unsupervised ML - Free Course,All Courses,https://courses.analyticsvidhya.com/courses/free-unsupervised-ml-guide,13 Lessons,Free,No reviews
|
59 |
+
Bagging and Boosting ML Algorithms - Free Course,All Courses,https://courses.analyticsvidhya.com/courses/bagging-boosting-ML-Algorithms,16 Lessons,Free,No reviews
|
60 |
+
Data Preprocessing on a Real-World Problem Statement - Free Course,All Courses,https://courses.analyticsvidhya.com/courses/data-preprocessing,13 Lessons,Free,(3)
|
61 |
+
Introduction to Business Analytics,"All Courses,
|
62 |
+
|
63 |
+
|
64 |
+
|
65 |
+
Business Analytics Courses",https://courses.analyticsvidhya.com/courses/introduction-to-analytics,32 Lessons,Free,(424)
|
66 |
+
Microsoft Excel: Formulas & Functions,Business Analytics Courses,https://courses.analyticsvidhya.com/courses/microsoft-excel-formulas-functions,33 Lessons,Free,(390)
|
67 |
+
Tableau for Beginners,"All Courses,
|
68 |
+
|
69 |
+
|
70 |
+
|
71 |
+
Tools",https://courses.analyticsvidhya.com/courses/tableau-for-beginners,17 Lessons,Free,(240)
|
72 |
+
Loan Prediction Practice Problem (Using Python),"All Courses,
|
73 |
+
|
74 |
+
|
75 |
+
|
76 |
+
Projects,
|
77 |
+
|
78 |
+
|
79 |
+
|
80 |
+
Machine Learning Courses",https://courses.analyticsvidhya.com/courses/loan-prediction-practice-problem-using-python,16 Lessons,Free,(358)
|
81 |
+
Twitter Sentiment Analysis,"All Courses,
|
82 |
+
|
83 |
+
|
84 |
+
|
85 |
+
Projects,
|
86 |
+
|
87 |
+
|
88 |
+
|
89 |
+
Machine Learning Courses",https://courses.analyticsvidhya.com/courses/twitter-sentiment-analysis,18 Lessons,Free,(127)
|
90 |
+
Introduction to Web Scraping using Python,All Courses,https://courses.analyticsvidhya.com/courses/introduction-to-web-scraping,13 Lessons,Free,(96)
|
91 |
+
Big Mart Sales Prediction Using R,"All Courses,
|
92 |
+
|
93 |
+
|
94 |
+
|
95 |
+
Projects,
|
96 |
+
|
97 |
+
|
98 |
+
|
99 |
+
Machine Learning Courses",https://courses.analyticsvidhya.com/courses/big-mart-sales-prediction-using-r,19 Lessons,Free,(80)
|
100 |
+
Time Series Forecasting using Python,"All Courses,
|
101 |
+
|
102 |
+
|
103 |
+
|
104 |
+
Projects,
|
105 |
+
|
106 |
+
|
107 |
+
|
108 |
+
Machine Learning Courses,
|
109 |
+
|
110 |
+
|
111 |
+
|
112 |
+
Business Analytics Courses",https://courses.analyticsvidhya.com/courses/creating-time-series-forecast-using-python,22 Lessons,Free,(209)
|
app.py
ADDED
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
from sentence_transformers import SentenceTransformer, util
|
3 |
+
import pandas as pd
|
4 |
+
import numpy as np
|
5 |
+
|
6 |
+
# Load pre-trained model
|
7 |
+
model = SentenceTransformer('all-MiniLM-L6-v2')
|
8 |
+
|
9 |
+
# Load the course data from CSV
|
10 |
+
df = pd.read_csv('analytics.csv')
|
11 |
+
|
12 |
+
# Generate embeddings for course titles and descriptions
|
13 |
+
course_embeddings = model.encode(df['Title'] + ' ' + df['Description'], convert_to_tensor=True)
|
14 |
+
|
15 |
+
# Function to search for courses based on a query
|
16 |
+
def search_courses(query, top_n=5):
|
17 |
+
if top_n <= 0:
|
18 |
+
raise ValueError("top_n must be greater than zero")
|
19 |
+
|
20 |
+
query_embedding = model.encode(query, convert_to_tensor=True)
|
21 |
+
similarities = util.pytorch_cos_sim(query_embedding, course_embeddings)[0].numpy()
|
22 |
+
|
23 |
+
if np.any(np.isnan(similarities)) or np.any(np.isinf(similarities)):
|
24 |
+
raise ValueError("Similarity scores contain NaN or infinity values")
|
25 |
+
|
26 |
+
top_results = np.argsort(similarities)[::-1][:top_n]
|
27 |
+
|
28 |
+
results = []
|
29 |
+
for idx in top_results:
|
30 |
+
course_info = {
|
31 |
+
'Title': df.iloc[idx]['Title'],
|
32 |
+
'Description': df.iloc[idx]['Description'],
|
33 |
+
'Link': df.iloc[idx]['Link'],
|
34 |
+
'Relevance Score': similarities[idx].item()
|
35 |
+
}
|
36 |
+
results.append(course_info)
|
37 |
+
|
38 |
+
return results
|
39 |
+
|
40 |
+
# Streamlit app configuration
|
41 |
+
st.set_page_config(page_title="Smart Course Finder", layout="centered")
|
42 |
+
|
43 |
+
# App title and description
|
44 |
+
st.title("π Smart Course Finder for Analytics Vidhya")
|
45 |
+
st.markdown("""
|
46 |
+
Find the best free courses that match your learning interests. Enter a keyword or topic to discover the most relevant courses available.
|
47 |
+
""")
|
48 |
+
|
49 |
+
# Input field for the query
|
50 |
+
query = st.text_input("Enter your search query:", placeholder="e.g., Machine Learning, Data Science, Generative AI")
|
51 |
+
|
52 |
+
# Search button and display results
|
53 |
+
if st.button("Search") and query:
|
54 |
+
with st.spinner("Searching for courses..."):
|
55 |
+
try:
|
56 |
+
top_courses = search_courses(query)
|
57 |
+
if top_courses:
|
58 |
+
st.success("Top courses found:")
|
59 |
+
for course in top_courses:
|
60 |
+
st.subheader(f"π {course['Title']}")
|
61 |
+
st.write(f"**Description**: {course['Description']}")
|
62 |
+
st.write(f"**Relevance Score**: {course['Relevance Score']:.2f}")
|
63 |
+
st.markdown(f"[π View Course]({course['Link']})", unsafe_allow_html=True)
|
64 |
+
st.markdown("---")
|
65 |
+
else:
|
66 |
+
st.warning("No courses found for the given query. Try different keywords.")
|
67 |
+
except ValueError as e:
|
68 |
+
st.error(f"Error: {e}")
|
69 |
+
|
70 |
+
# Footer with credits
|
71 |
+
st.markdown("""
|
72 |
+
---
|
73 |
+
*Built with β€οΈ using Streamlit and SentenceTransformers*
|
74 |
+
""")
|
requirements.txt
ADDED
Binary file (82 Bytes). View file
|
|