"""Configuration settings for the collaborative decoding application""" # CSS file paths for the Gradio interface CSS_PATHS = [ "static/css/base.css", "static/css/components.css", "static/css/gallery.css", "static/css/game.css", "static/css/landing.css", "static/css/scores.css", ] # Model configurations DEFAULT_LLM_MODEL = "meta-llama/Llama-3.2-1B-Instruct" DEFAULT_SIMILARITY_MODEL = "all-MiniLM-L6-v2" # Token limits MAX_USER_TOKENS = 5 # Huggingface data repositories HF_PROMPTS_REPO = "alon-albalak/collaborative-decoding-prompts" HF_RESULTS_REPO = "alon-albalak/collaborative-decoding-results" # Server configuration DEFAULT_SERVER_NAME = "127.0.0.1" DEFAULT_SERVER_PORT = 7860 DEFAULT_SHARE = False # Template directory TEMPLATES_DIR = "templates/components" # Gallery settings DEFAULT_GALLERY_MIN_SCORE = 0.3 DEFAULT_GALLERY_LIMIT = 20 # Inspire me settings DEFAULT_INSPIRE_LIMIT = 5 INSPIRE_MIN_SCORE = 0.2 # Scoring thresholds SCORE_THRESHOLDS = { "legendary": 0.7, "exceptional": 0.5, "great": 0.3, "good": 0.15 } # Achievement titles ACHIEVEMENT_TITLES = { "creativity": { 0.7: "🌟 Creative Genius", 0.5: "🔥 Innovation Master", 0.3: "✨ Creative Spark", 0.15: "💡 Imagination Worker" }, "efficiency": { 1: "⚡ Word Wizard", # 1 token high score 2: "🎪 Phrase Magician", # 2 token high score }, "special": { "one_word_wonder": "👑 One-Word Wonder", # 1 token + high score "efficiency_expert": "🏆 Efficiency Expert", # high score + low tokens "bold_wordsmith": "🎖️ Bold Wordsmith", # many tokens + high score "creative_explorer": "🌱 Creative Explorer" # default } } # Tutorial example data TUTORIAL_EXAMPLE = { "prompt": "Write a short story about a magical library where books come to life.", "llm_partial_response": "The old library stood silent in the moonlight. Sarah pushed open the heavy wooden door and stepped inside. As she walked between the towering shelves, she noticed something strange - the books seemed to be", "llm_full_response_original": "The old library stood silent in the moonlight. Sarah pushed open the heavy wooden door and stepped inside. As she walked between the towering shelves, she noticed something strange - the books seemed to be whispering softly to each other. She approached one of the shelves and reached for an old leather-bound volume. As her fingers touched the spine, the book suddenly opened itself, its pages fluttering gently as if moved by an invisible breeze. The words on the page began to shimmer and dance, rearranging themselves into new sentences that told a completely different story than what was written before.", "example_input": "glowing and floating", "example_creative": "The old library stood silent in the moonlight. Sarah pushed open the heavy wooden door and stepped inside. As she walked between the towering shelves, she noticed something strange - the books seemed to be glowing and floating several inches above the shelves, their covers pulsing with ethereal light. Suddenly, a small red book zipped past her head like a hummingbird, followed by an entire encyclopedia that flapped its pages like wings. A cookbook landed on her shoulder and whispered a recipe for 'Dreams and Starlight Soup' directly into her ear. Sarah laughed with delight as she realized she had stumbled into a library where books had not only come to life, but had learned to fly, forming murations that spelled out stories in the air above her head.", "example_score": 0.67 }