| import os | |
| from dotenv import load_dotenv | |
| from typing import Literal | |
| load_dotenv() | |
| GENRE_LIST = Literal[ | |
| "Action", | |
| "Adventure", | |
| "Animation", | |
| "Comedy", | |
| "Crime", | |
| "Documentary", | |
| "Drama", | |
| "Family", | |
| "Fantasy", | |
| "History", | |
| "Horror", | |
| "Musical", | |
| "Music", | |
| "Mystery", | |
| "Romance", | |
| "Sci-Fi", | |
| "TV Movie", | |
| "Thriller", | |
| "War", | |
| "Western", | |
| "Biography", | |
| "Sport", | |
| "Film-Noir", | |
| "Talk-Show", | |
| "Game-Show", | |
| "News", | |
| "Short", | |
| "Adult", | |
| "Reality-TV", | |
| ] | |
| COUNTRY_LIST = Literal[ | |
| "Italy", | |
| "France", | |
| "Sweden", | |
| "Germany", | |
| "United States", | |
| "Denmark", | |
| "Soviet Union", | |
| "United Kingdom", | |
| "Australia", | |
| "Austria", | |
| "Switzerland", | |
| "Japan", | |
| "Canada", | |
| "Isle of Man", | |
| "Hungary", | |
| "Brazil", | |
| "Czechoslovakia", | |
| "Portugal", | |
| "Mexico", | |
| "Norway", | |
| "India", | |
| "West Germany", | |
| "Yugoslavia", | |
| "Spain", | |
| "Egypt", | |
| "Finland", | |
| "Albania", | |
| "Poland", | |
| "Greece", | |
| "Hong Kong", | |
| "East Germany", | |
| "Venezuela", | |
| "Ireland", | |
| "Jamaica", | |
| "Monaco", | |
| "Turkey", | |
| "Bulgaria", | |
| "Romania", | |
| "Israel", | |
| "Cuba", | |
| "Algeria", | |
| "Bahamas", | |
| "China", | |
| "Taiwan", | |
| "South Africa", | |
| "Senegal", | |
| "Belgium", | |
| "Bermuda", | |
| "Morocco", | |
| "Argentina", | |
| "Netherlands", | |
| "Croatia", | |
| "Chile", | |
| "Iran", | |
| "Estonia", | |
| "Luxembourg", | |
| "Peru", | |
| "Colombia", | |
| "Bangladesh", | |
| "Thailand", | |
| "Philippines", | |
| "Lebanon", | |
| "Libya", | |
| "Kuwait", | |
| "Côte d'Ivoire", | |
| "Iceland", | |
| "South Korea", | |
| "Fiji", | |
| "Botswana", | |
| "New Zealand", | |
| "Greenland", | |
| "Martinique", | |
| "Netherlands Antilles", | |
| "Tunisia", | |
| "Indonesia", | |
| "Zimbabwe", | |
| "Kenya", | |
| "Mali", | |
| "Burkina Faso", | |
| "Cameroon", | |
| "Ghana", | |
| "North Korea", | |
| "Macao", | |
| "Jordan", | |
| "Antarctica", | |
| "Vietnam", | |
| "Russia", | |
| "Federal Republic of Yugoslavia", | |
| "Uruguay", | |
| "Malaysia", | |
| "Armenia", | |
| "Czech Republic", | |
| "Liechtenstein", | |
| "Georgia", | |
| "North Macedonia", | |
| "Bosnia and Herzegovina", | |
| "Slovakia", | |
| "Kazakhstan", | |
| "Slovenia", | |
| "Singapore", | |
| "Cambodia", | |
| "Aruba", | |
| "Tajikistan", | |
| "Latvia", | |
| "Uzbekistan", | |
| "Malta", | |
| "Ukraine", | |
| "Pakistan", | |
| "Bhutan", | |
| "Belarus", | |
| "Cyprus", | |
| "Nepal", | |
| "Haiti", | |
| "Lithuania", | |
| "United Arab Emirates", | |
| "Occupied Palestinian Territory", | |
| "Serbia", | |
| "Serbia and Montenegro", | |
| "Afghanistan", | |
| "Mongolia", | |
| "Ecuador", | |
| "Puerto Rico", | |
| "Rwanda", | |
| "Vatican", | |
| "Guatemala", | |
| "Iraq", | |
| "Paraguay", | |
| "Bahrain", | |
| "Saudi Arabia", | |
| "Qatar", | |
| "Cayman Islands", | |
| "Sudan", | |
| "Dominican Republic", | |
| "Sri Lanka", | |
| "Liberia", | |
| "Lesotho", | |
| "Bolivia", | |
| "Faroe Islands", | |
| "Azerbaijan", | |
| "New Caledonia", | |
| "Costa Rica", | |
| "Nigeria", | |
| "Kosovo", | |
| "French Polynesia", | |
| "Syria", | |
| "Papua New Guinea", | |
| "Gambia", | |
| "Chad", | |
| "Panama", | |
| "Moldova", | |
| "Uganda", | |
| "Montenegro", | |
| "Laos", | |
| "Mauritius", | |
| "Ethiopia", | |
| "Kyrgyzstan", | |
| "Namibia", | |
| "Benin", | |
| "Mauritania", | |
| "The Democratic Republic of Congo", | |
| "Vanuatu", | |
| "Myanmar", | |
| "Tanzania", | |
| "Marshall Islands", | |
| "Zambia", | |
| "Guadeloupe", | |
| "Malawi", | |
| "Yemen", | |
| ] | |
| QUALITY_LEVELS = { | |
| "legendary": {"min_rating": 8.0, "min_votes": 100000, "rating_weight": 0.2}, | |
| "classic": {"min_rating": 7.5, "min_votes": 50000, "rating_weight": 0.15}, | |
| "popular": {"min_rating": 6.5, "min_votes": 10000, "rating_weight": 0.15}, | |
| "niche": {"min_rating": 7.0, "max_votes": 50000, "rating_weight": -0.1}, | |
| "cult": {"min_rating": 6.0, "max_votes": 25000, "rating_weight": -0.15}, | |
| "mainstream": {"min_rating": 5.5, "min_votes": 10000, "rating_weight": 0.2}, | |
| "any": {"rating_weight": 0.1}, | |
| } | |
| class Config: | |
| OPENAI_API_KEY = os.getenv("OPENAI_API_KEY") | |
| TMDB_API_KEY = os.getenv("TMDB_API_KEY") | |
| TMDB_BASE_URL = "https://api.themoviedb.org/3" | |
| TMDB_IMAGE_BASE_URL = "https://image.tmdb.org/t/p/w500" | |
| EMBEDDING_MODEL = "Qwen/Qwen3-Embedding-0.6B" | |
| DATA_FILE = "data/demo_data.parquet" | |
| THEME = "soft" | |
| TITLE = "🎬 AI Movie & TV Series Recommender" | |