Spaces:
Runtime error
Runtime error
Commit
·
e1b211d
1
Parent(s):
a5d8a5a
fix typo
Browse files- app.py +2 -2
- src/aineid/src/MainPage.jsx +4 -9
app.py
CHANGED
@@ -310,10 +310,10 @@ async def translate_all(text: Optional[str] = None):
|
|
310 |
morph_simplified_result = translate_morph_simplified(process_line_morph_simplified(text))
|
311 |
|
312 |
return json.dumps({
|
313 |
-
'
|
314 |
'case': case_result,
|
315 |
'morph': morph_result,
|
316 |
-
'
|
317 |
})
|
318 |
else:
|
319 |
return json.dumps({"error": "Missing required parameter 'text'"}), 400
|
|
|
310 |
morph_simplified_result = translate_morph_simplified(process_line_morph_simplified(text))
|
311 |
|
312 |
return json.dumps({
|
313 |
+
'base': base_result,
|
314 |
'case': case_result,
|
315 |
'morph': morph_result,
|
316 |
+
'morph_simplified': morph_simplified_result
|
317 |
})
|
318 |
else:
|
319 |
return json.dumps({"error": "Missing required parameter 'text'"}), 400
|
src/aineid/src/MainPage.jsx
CHANGED
@@ -21,15 +21,10 @@ function MainPage() {
|
|
21 |
|
22 |
const [inputText, setInputText] = useState("");
|
23 |
const [isLoading, setIsLoading] = useState(false);
|
24 |
-
const [translation, setTranslation] = useState({
|
25 |
-
original: "",
|
26 |
-
case: "",
|
27 |
-
morph: "",
|
28 |
-
morph_simplified: "",
|
29 |
-
});
|
30 |
|
31 |
const nameMap = {
|
32 |
-
|
33 |
case: "Case-Split",
|
34 |
morph: "Morphological Split",
|
35 |
morph_simplified: "Simplified Morphological Split"
|
@@ -99,9 +94,9 @@ function MainPage() {
|
|
99 |
mb={4}
|
100 |
/>
|
101 |
{/\d/.test(inputText) &&
|
102 |
-
<Alert status='warning'>
|
103 |
<AlertIcon />
|
104 |
-
You have English numbers in your source text - these should not be found in Latin source. Either remove them or be prepared to receive corrupted
|
105 |
</Alert>}
|
106 |
{
|
107 |
isLoading ?
|
|
|
21 |
|
22 |
const [inputText, setInputText] = useState("");
|
23 |
const [isLoading, setIsLoading] = useState(false);
|
24 |
+
const [translation, setTranslation] = useState({});
|
|
|
|
|
|
|
|
|
|
|
25 |
|
26 |
const nameMap = {
|
27 |
+
base: "Raw input",
|
28 |
case: "Case-Split",
|
29 |
morph: "Morphological Split",
|
30 |
morph_simplified: "Simplified Morphological Split"
|
|
|
94 |
mb={4}
|
95 |
/>
|
96 |
{/\d/.test(inputText) &&
|
97 |
+
<Alert status='warning' mb={6}>
|
98 |
<AlertIcon />
|
99 |
+
You have English numbers in your source text - these should not be found in Latin source. Either remove them or be prepared to receive corrupted translations.
|
100 |
</Alert>}
|
101 |
{
|
102 |
isLoading ?
|