Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -25,7 +25,7 @@ def recommend(index):
|
|
| 25 |
|
| 26 |
return list(sorted_final.keys())
|
| 27 |
|
| 28 |
-
st.set_page_config(page_title='DiscoverCourses', page_icon=':
|
| 29 |
|
| 30 |
container = st.container()
|
| 31 |
container.title('DiscoverCourses')
|
|
@@ -38,7 +38,8 @@ if container.button('Recommend by title'):
|
|
| 38 |
index=np.where(coursedf['title'] == result)[0][0]
|
| 39 |
course_id=coursedf.iloc[index,0]
|
| 40 |
st.subheader(course_id+": "+result)
|
| 41 |
-
|
|
|
|
| 42 |
link = "[ExploreCourses](https://explorecourses.stanford.edu/search?q="+course_id+"+"+result.replace(" ","+")+")"
|
| 43 |
st.markdown(link, unsafe_allow_html=True)
|
| 44 |
st.divider()
|
|
@@ -49,7 +50,8 @@ if container.button('Recommend by description'):
|
|
| 49 |
for result in rec_list:
|
| 50 |
course_id=coursedf.iloc[index_new,0]
|
| 51 |
st.subheader(course_id+": "+result)
|
| 52 |
-
|
|
|
|
| 53 |
link = "[ExploreCourses](https://explorecourses.stanford.edu/search?q="+course_id+"+"+result.replace(" ","+")+")"
|
| 54 |
st.markdown(link, unsafe_allow_html=True)
|
| 55 |
st.divider()
|
|
|
|
| 25 |
|
| 26 |
return list(sorted_final.keys())
|
| 27 |
|
| 28 |
+
st.set_page_config(page_title='DiscoverCourses', page_icon=':bird:')
|
| 29 |
|
| 30 |
container = st.container()
|
| 31 |
container.title('DiscoverCourses')
|
|
|
|
| 38 |
index=np.where(coursedf['title'] == result)[0][0]
|
| 39 |
course_id=coursedf.iloc[index,0]
|
| 40 |
st.subheader(course_id+": "+result)
|
| 41 |
+
with st.expander("See description"):
|
| 42 |
+
st.write(course_df_new.iloc[index,3]) #Using the new coursedf because it has proper descriptions for each course
|
| 43 |
link = "[ExploreCourses](https://explorecourses.stanford.edu/search?q="+course_id+"+"+result.replace(" ","+")+")"
|
| 44 |
st.markdown(link, unsafe_allow_html=True)
|
| 45 |
st.divider()
|
|
|
|
| 50 |
for result in rec_list:
|
| 51 |
course_id=coursedf.iloc[index_new,0]
|
| 52 |
st.subheader(course_id+": "+result)
|
| 53 |
+
with st.expander("See description"):
|
| 54 |
+
st.write(course_df_new.iloc[index_new,3]) #Using the new coursedf because it has proper descriptions for each course
|
| 55 |
link = "[ExploreCourses](https://explorecourses.stanford.edu/search?q="+course_id+"+"+result.replace(" ","+")+")"
|
| 56 |
st.markdown(link, unsafe_allow_html=True)
|
| 57 |
st.divider()
|