Spaces:
Running on Zero
Running on Zero
Deploiement GuindiMa AI (interface Gradio) (part 2)
Browse files- src/app/apparence.py +22 -1
- src/intent/extract_intent.py +3 -0
src/app/apparence.py
CHANGED
|
@@ -106,7 +106,28 @@ def ouvrir_carte() -> str:
|
|
| 106 |
HEAD_CLAIR = """
|
| 107 |
<meta name="color-scheme" content="light only">
|
| 108 |
<meta name="theme-color" content="#FFFFFF">
|
|
|
|
|
|
|
| 109 |
<script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 110 |
(function () {
|
| 111 |
try {
|
| 112 |
var adresse = new URL(window.location.href);
|
|
@@ -730,7 +751,7 @@ GLOBE_HTML = f"""
|
|
| 730 |
</svg>
|
| 731 |
</span>
|
| 732 |
</button>
|
| 733 |
-
<p class="globe-etat" aria-live="polite">{TEXTES_GLOBE['repos']}</p>
|
| 734 |
<p class="globe-promesse">{PROMESSE}</p>
|
| 735 |
<button type="button" class="globe-secours">Problème de micro ? Micro classique</button>
|
| 736 |
</div>
|
|
|
|
| 106 |
HEAD_CLAIR = """
|
| 107 |
<meta name="color-scheme" content="light only">
|
| 108 |
<meta name="theme-color" content="#FFFFFF">
|
| 109 |
+
<meta name="google" content="notranslate">
|
| 110 |
+
<meta http-equiv="Content-Language" content="fr">
|
| 111 |
<script>
|
| 112 |
+
(function () {
|
| 113 |
+
// Lot T7 : Chrome sur téléphone traduisait la page (« Ton code » -> « Code de
|
| 114 |
+
// tonnage », « tu » -> « vous », « PythonMindset » -> « Mentalité Python »).
|
| 115 |
+
// Le gabarit de Gradio 6.30 écrit <html lang="en"> en dur : Chrome croyait
|
| 116 |
+
// la page anglaise. Ce <head> est le moyen prévu par Gradio : la page se
|
| 117 |
+
// déclare française et refuse toute traduction.
|
| 118 |
+
try {
|
| 119 |
+
var racine = document.documentElement;
|
| 120 |
+
racine.setAttribute("lang", "fr");
|
| 121 |
+
racine.setAttribute("translate", "no");
|
| 122 |
+
racine.classList.add("notranslate");
|
| 123 |
+
function corpsSansTraduction() {
|
| 124 |
+
document.body.setAttribute("translate", "no");
|
| 125 |
+
document.body.classList.add("notranslate");
|
| 126 |
+
}
|
| 127 |
+
if (document.body) { corpsSansTraduction(); }
|
| 128 |
+
else { document.addEventListener("DOMContentLoaded", corpsSansTraduction); }
|
| 129 |
+
} catch (e) {}
|
| 130 |
+
})();
|
| 131 |
(function () {
|
| 132 |
try {
|
| 133 |
var adresse = new URL(window.location.href);
|
|
|
|
| 751 |
</svg>
|
| 752 |
</span>
|
| 753 |
</button>
|
| 754 |
+
<p class="globe-etat" lang="wo" aria-live="polite">{TEXTES_GLOBE['repos']}</p>
|
| 755 |
<p class="globe-promesse">{PROMESSE}</p>
|
| 756 |
<button type="button" class="globe-secours">Problème de micro ? Micro classique</button>
|
| 757 |
</div>
|
src/intent/extract_intent.py
CHANGED
|
@@ -888,6 +888,9 @@ MOTS_DE_LA_PHRASE = {
|
|
| 888 |
"de", "deu", "dee", "dawal", "jel", "jeel", "won", "ana", "fan", "fu", "diougue",
|
| 889 |
# « ban bus » (« quel bus ») : formule, jamais un lieu.
|
| 890 |
"ban",
|
|
|
|
|
|
|
|
|
|
| 891 |
# « sama bopp » et ses variantes, réécrits par REPLACEMENTS_PHRASE.
|
| 892 |
"soimeme",
|
| 893 |
# Lot T1 : « waaye » (mais) donnait « medina waaye » -> Gadaye ; mots d'étape.
|
|
|
|
| 888 |
"de", "deu", "dee", "dawal", "jel", "jeel", "won", "ana", "fan", "fu", "diougue",
|
| 889 |
# « ban bus » (« quel bus ») : formule, jamais un lieu.
|
| 890 |
"ban",
|
| 891 |
+
# Lot T7 : formes collées ou déformées de « maa ngi » (marqueur de départ,
|
| 892 |
+
# data/corrections/alias_lieux_parles_t7.csv) ; « mangu » donnait Dangou.
|
| 893 |
+
"mangu", "mangui", "maagi", "magi", "magir", "maaŋgi", "ngui",
|
| 894 |
# « sama bopp » et ses variantes, réécrits par REPLACEMENTS_PHRASE.
|
| 895 |
"soimeme",
|
| 896 |
# Lot T1 : « waaye » (mais) donnait « medina waaye » -> Gadaye ; mots d'étape.
|