from pathlib import Path banner_url = "https://allenai.github.io/WildBench/gray_banner.png" # the same repo here. banner_url = "/file/data/image.png" BANNER = f'
PolygloToxicityPrompts Banner
' # BANNER = "" TITLE = "

AI2 PolygloToxicityPrompts Leaderboard " CITATION_TEXT = """ @misc{jain2024polyglotoxicityprompts, title={PolygloToxicityPrompts: Multilingual Evaluation of Neural Toxic Degeneration in Large Language Models}, author={Devansh Jain and Priyanshu Kumar and Samuel Gehman and Xuhui Zhou and Thomas Hartvigsen and Maarten Sap}, year={2024}, eprint={2405.09373}, archivePrefix={arXiv}, primaryClass={cs.CL} } """ column_names = { "model name ": "Model", "elo overall": "Overall Elo", 'Information seeking': 'InfoSek', 'Creative Writing': 'CrtWrt', 'Coding & Debugging': 'Code', 'Reasoning': 'Reason', 'Editing': 'Edit', 'Math': 'Math', 'Planning': 'Plan', 'Brainstorming': 'Brnstrm', 'Role playing': 'RolPly', 'Advice seeking': 'AdvSek', 'Data Analysis': 'DataAna', 'Others': 'Misc', "average": "Task-Avg Elo", } all_task_types = [ 'Information seeking', 'Creative Writing', 'Coding & Debugging', 'Reasoning', 'Editing', 'Math', 'Planning', 'Brainstorming', 'Role playing', 'Advice seeking', 'Data Analysis', 'Others' ] js_light = """ function refresh() { const url = new URL(window.location); if (url.searchParams.get('__theme') !== 'light') { url.searchParams.set('__theme', 'light'); window.location.href = url.href; } } """ js_code = """ function scroll_top() { console.log("Hello from Gradio!"); const bubbles = document.querySelectorAll('.bubble-wrap'); bubbles.forEach((bubble, index) => { setTimeout(() => { bubble.scrollTop = 0; }, index * 100); // Delay of 100ms between each iteration }); } """ css = """ code { font-size: large; } footer {visibility: hidden} .top-left-LP{ margin-top: 6px; margin-left: 5px; } .markdown-text{font-size: 14pt} .markdown-text-small{font-size: 13pt} .markdown-text-tiny{font-size: 12pt} .markdown-text-tiny-red{ font-size: 12pt; color: red; background-color: yellow; font-color: red; font-weight: bold; } th { text-align: center; font-size: 17px; /* Adjust the font size as needed */ } td { font-size: 15px; /* Adjust the font size as needed */ text-align: center; } .sample_button{ border: 1px solid #000000; border-radius: 5px; padding: 5px; font-size: 15pt; font-weight: bold; margin: 5px; } .chat-common{ height: auto; max-height: 400px; min-height: 100px; } .chat-specific{ height: auto; max-height: 600px; min-height: 200px; } #od-benchmark-tab-table-button{ font-size: 15pt; font-weight: bold; } .btn_boderline{ border: 1px solid #000000; border-radius: 5px; padding: 5px; margin: 5px; font-size: 15pt; font-weight: bold; } .btn_boderline_next{ border: 0.1px solid #000000; border-radius: 5px; padding: 5px; margin: 5px; font-size: 15pt; font-weight: bold; } .btn_boderline_gray{ border: 0.5px solid gray; border-radius: 5px; padding: 5px; margin: 5px; font-size: 15pt; font-weight: italic; } .btn_boderline_selected{ border: 2px solid purple; background-color: #f2f2f2; border-radius: 5px; padding: 5px; margin: 5px; font-size: 15pt; font-weight: bold; } .accordion-label button span{ font-size: 14pt; font-weight: bold; } #select-models span{ font-size: 10pt; } #select-tasks span{ font-size: 10pt; } .markdown-text-details{ margin: 10px; padding: 10px; } button.selected[role="tab"][aria-selected="true"] { font-size: 18px; /* or any other size you prefer */ font-weight: bold; } #od-benchmark-tab-table-ablation-button { font-size: larger; /* Adjust the font size as needed */ } .plotly-plot{ height: auto; max-height: 600px; min-height: 600px; } """