Main File
format_recommendations(df)
Format movie recommendations as a user-friendly text display.
This function converts a DataFrame of movie recommendations into a visually appealing text format with emojis and clear formatting. Designed for display in the Gradio interface output.
Example
Source code in src/main.py
format_recommendations_markdown(df)
Format movie recommendations as a Markdown table.
This function converts a DataFrame of movie recommendations into a formatted Markdown table with movie titles and genres. Useful for displaying recommendations in Markdown-compatible interfaces or documentation.
Example
Source code in src/main.py
recommend_movies(user_input)
Generate movie recommendations based on user input.
This is the main function that powers the movie recommendation system. It parses user input, creates a rating profile, and generates recommendations using either the hybrid model (if available) or content-based filtering.
Source code in src/main.py
test_recommendations()
Test the recommendation system with predefined movie inputs.
This function runs automated tests on the recommendation system using different genres and movie combinations to verify functionality. Useful for debugging and ensuring the system works correctly before deployment.