Spaces:
Running
Running
Commit
·
39f88fd
1
Parent(s):
d6456b2
Changes
Browse files
app.py
CHANGED
@@ -30,6 +30,7 @@ def respond(
|
|
30 |
print("the text",message, 'the source',sourceLanguage,"the target",targetLanguage)
|
31 |
|
32 |
if(useGoogle):
|
|
|
33 |
text="Translate to "f"{targetLanguage}: "f"{message}"
|
34 |
googleResponse= googleClient.text_generation(
|
35 |
text
|
@@ -38,6 +39,7 @@ def respond(
|
|
38 |
return googleResponse
|
39 |
|
40 |
if(toFinnish):
|
|
|
41 |
fiResponse= englishToFinnishClient.translation(
|
42 |
message,
|
43 |
#max_new_tokens=100
|
@@ -48,6 +50,7 @@ def respond(
|
|
48 |
return fiResponse.translation_text
|
49 |
|
50 |
if(fromFinnish):
|
|
|
51 |
fiResponse=finnishToEnglishClient.translation(
|
52 |
message,
|
53 |
tgt_lang= targetLanguage,
|
|
|
30 |
print("the text",message, 'the source',sourceLanguage,"the target",targetLanguage)
|
31 |
|
32 |
if(useGoogle):
|
33 |
+
print("using google")
|
34 |
text="Translate to "f"{targetLanguage}: "f"{message}"
|
35 |
googleResponse= googleClient.text_generation(
|
36 |
text
|
|
|
39 |
return googleResponse
|
40 |
|
41 |
if(toFinnish):
|
42 |
+
print("to finnish")
|
43 |
fiResponse= englishToFinnishClient.translation(
|
44 |
message,
|
45 |
#max_new_tokens=100
|
|
|
50 |
return fiResponse.translation_text
|
51 |
|
52 |
if(fromFinnish):
|
53 |
+
print("From Finnish called")
|
54 |
fiResponse=finnishToEnglishClient.translation(
|
55 |
message,
|
56 |
tgt_lang= targetLanguage,
|