amine_dubs
commited on
Commit
·
8315bcd
1
Parent(s):
ed71793
upload
Browse files- backend/main.py +13 -0
- static/script.js +1 -1
backend/main.py
CHANGED
@@ -125,6 +125,19 @@ translation_models: Dict[str, Dict] = {
|
|
125 |
"translator": None,
|
126 |
"model_name": "Helsinki-NLP/opus-mt-de-en",
|
127 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
# Can add more language pairs here as needed
|
129 |
}
|
130 |
|
|
|
125 |
"translator": None,
|
126 |
"model_name": "Helsinki-NLP/opus-mt-de-en",
|
127 |
},
|
128 |
+
"ar-fr": {
|
129 |
+
"model": None,
|
130 |
+
"tokenizer": None,
|
131 |
+
"translator": None,
|
132 |
+
"model_name": "Helsinki-NLP/opus-mt-ar-fr",
|
133 |
+
},
|
134 |
+
"fr-ar": {
|
135 |
+
"model": None,
|
136 |
+
"tokenizer": None,
|
137 |
+
"translator": None,
|
138 |
+
"model_name": "Helsinki-NLP/opus-mt-fr-ar",
|
139 |
+
},
|
140 |
+
|
141 |
# Can add more language pairs here as needed
|
142 |
}
|
143 |
|
static/script.js
CHANGED
@@ -15,7 +15,7 @@ window.onload = function() {
|
|
15 |
// UI elements
|
16 |
const textInput = document.getElementById('text-input');
|
17 |
const textResult = document.getElementById('text-result');
|
18 |
-
const docResult = document.getElementById('
|
19 |
const textOutput = document.getElementById('text-output');
|
20 |
const docOutput = document.getElementById('doc-output');
|
21 |
const docInputText = document.getElementById('doc-input-text');
|
|
|
15 |
// UI elements
|
16 |
const textInput = document.getElementById('text-input');
|
17 |
const textResult = document.getElementById('text-result');
|
18 |
+
const docResult = document.getElementById('doc-result');
|
19 |
const textOutput = document.getElementById('text-output');
|
20 |
const docOutput = document.getElementById('doc-output');
|
21 |
const docInputText = document.getElementById('doc-input-text');
|