levanti_en_ar / consts.py
Guy Mor-Lan
add files
e35836c
raw
history blame
No virus
3.91 kB
CSS = """
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Hebrew:wght@400;700&family=Noto+Naskh+Arabic:wght@400;700&display=swap');
#taatik textarea {
font-size: 25px;
font-family: 'Noto Sans Hebrew', 'Noto Naskh Arabic', 'SBL Hebrew', 'David CLM', 'FrankRuehl CLM', 'Narkisim', 'Arial', 'Arial Unicode MS', sans-serif;
}
@font-face {
font-family: 'Noto Sans Hebrew';
src: url('https://fonts.gstatic.com/s/notosanshebrew/v40/or3HQ7v33eiDlKj4557q0OGCZa662.woff2') format('woff2');
unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
@font-face {
font-family: 'Noto Naskh Arabic';
src: url('https://fonts.gstatic.com/s/notonaskharabic/v30/RrQ5bpV-9Dd1b1OAGA6M9PkyDuVBePeKNaxcsss0Y7bwvc5Urqjc.woff2') format('woff2');
unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
#liter textarea, #trans textarea { font-size: 25px;}
#grp { padding: 10px; }
#diac_input textarea {direction: rtl;}
#diacritized textarea { direction: rtl; }
#diacritized2 textarea { direction: rtl; }
#diacritized textarea { font-size: 25px;}
#diacritized2 textarea { font-size: 25px;}
#taatik2 textarea { font-size: 25px;}
#input textarea { font-size: 20px;}
#diac_input textarea { font-size: 20px;}
#check { border-style: none !important; }
#nearest { font-family: 'SBL Hebrew', 'David CLM', 'FrankRuehl CLM', 'Narkisim', 'Arial'; }
:root {--button-secondary-background-focus: #2563eb !important;
--button-secondary-background-base: #2563eb !important;
--button-secondary-background-hover: linear-gradient(to bottom right, #0692e8, #5859c2);
--button-secondary-text-color-base: white !important;
--button-secondary-text-color-hover: white !important;
--button-secondary-background-focus: rgb(51 122 216 / 70%) !important;
--button-secondary-text-color-focus: white !important}
.dark {--button-secondary-background-base: #2563eb !important;
--button-secondary-background-focus: rgb(51 122 216 / 70%) !important;
--button-secondary-background-hover: linear-gradient(to bottom right, #0692e8, #5859c2)}
.feather-music { stroke: #2563eb; }
.dataframe {
font-family: 'Arial', 'Helvetica', sans-serif !important;
}
.dataframe th, .dataframe td {
font-family: inherit !important;
}
.gradio-container .dataframe {
font-family: Arial, sans-serif !important;
}
/* Target the table header cells */
.table th .cell-wrap {
text-align: right !important;
}
/* Target the span inside the header cells */
.table th .cell-wrap span {
text-align: right !important;
display: block;
font-family: Arial, sans-serif !important;
}
/* Ensure the sort button doesn't interfere with alignment */
.table th .cell-wrap .sort-button {
float: left;
}
/* Target the table body cells */
.table td {
text-align: right !important;
}
/* Target the span inside the body cells */
.table td .cell-wrap span {
text-align: right !important;
display: block;
font-family: Arial, sans-serif !important;
font-size: 20px;
}
"""
ABOUT = """
This tool was created by Guy Mor-Lan as part of the Levanti project. The tool translates text between Hebrew and various Levantine Arabic dialects using specialized AI models. The tool also supports automatic diacritization, conversion of diacritization to transliteration, and audio generation (experimental features). For more information, access to data and models, and the Hebrew version of the tool, see the [project page on Hugging Face](https://huggingface.co/datasets/guymorlan/levanti).
"""
JS_FUNC = """
function refresh() {
const url = new URL(window.location);
if (url.searchParams.get('__theme') !== 'dark') {
url.searchParams.set('__theme', 'dark');
window.location.href = url.href;
}
}
"""