Update app.py
Browse files
app.py
CHANGED
|
@@ -48,12 +48,6 @@ combined_features = vectorizer.transform(combined_features)
|
|
| 48 |
similarity = cosine_similarity(combined_features)
|
| 49 |
|
| 50 |
# Streamlit app
|
| 51 |
-
st.set_page_config(
|
| 52 |
-
page_title="Course Recommendation App",
|
| 53 |
-
page_icon="✅",
|
| 54 |
-
layout="wide",
|
| 55 |
-
)
|
| 56 |
-
|
| 57 |
st.title('Learning Pathway Index Course Recommendation')
|
| 58 |
user_input = st.text_input('Enter What You Want to Learn : ')
|
| 59 |
|
|
@@ -68,19 +62,12 @@ if user_input:
|
|
| 68 |
sorted_similar_course = sorted(similarity_score, key=lambda x: x[1], reverse=True)
|
| 69 |
|
| 70 |
st.subheader('Courses suggested for you:')
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
title_from_index = lpi_df.loc[index, 'Module']
|
| 76 |
-
if i % 2 == 0:
|
| 77 |
-
with col2:
|
| 78 |
-
st.write(f"{i}. {title_from_index}")
|
| 79 |
-
else:
|
| 80 |
-
with col1:
|
| 81 |
-
st.write(f"{i}. {title_from_index}")
|
| 82 |
|
| 83 |
if len(sorted_similar_course) == 0:
|
| 84 |
-
st.
|
| 85 |
else:
|
| 86 |
-
st.
|
|
|
|
| 48 |
similarity = cosine_similarity(combined_features)
|
| 49 |
|
| 50 |
# Streamlit app
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
st.title('Learning Pathway Index Course Recommendation')
|
| 52 |
user_input = st.text_input('Enter What You Want to Learn : ')
|
| 53 |
|
|
|
|
| 62 |
sorted_similar_course = sorted(similarity_score, key=lambda x: x[1], reverse=True)
|
| 63 |
|
| 64 |
st.subheader('Courses suggested for you:')
|
| 65 |
+
for i, course in enumerate(sorted_similar_course[:30], start=1):
|
| 66 |
+
index = course[0]
|
| 67 |
+
title_from_index = lpi_df.loc[index, 'Module']
|
| 68 |
+
st.write(f"{i}. {title_from_index}")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 69 |
|
| 70 |
if len(sorted_similar_course) == 0:
|
| 71 |
+
st.write('No close matches found.')
|
| 72 |
else:
|
| 73 |
+
st.write('No close matches found.')
|