Update app.py
Browse files
app.py
CHANGED
|
@@ -58,7 +58,7 @@ class Translators:
|
|
| 58 |
translation = pipe(self.input_text)
|
| 59 |
return translation[0]['translation_text']
|
| 60 |
|
| 61 |
-
@
|
| 62 |
def quickmttranslate(model_path, input_text):
|
| 63 |
from quickmt import Translator
|
| 64 |
# 'auto' auto-detects GPU, set to "cpu" to force CPU inference
|
|
@@ -69,7 +69,7 @@ class Translators:
|
|
| 69 |
translation = translator(input_text, beam_size=5)[0]
|
| 70 |
return translation
|
| 71 |
|
| 72 |
-
@
|
| 73 |
def quickmtdownload(model_name):
|
| 74 |
from quickmt.hub import hf_download
|
| 75 |
from pathlib import Path
|
|
|
|
| 58 |
translation = pipe(self.input_text)
|
| 59 |
return translation[0]['translation_text']
|
| 60 |
|
| 61 |
+
@staticmethod
|
| 62 |
def quickmttranslate(model_path, input_text):
|
| 63 |
from quickmt import Translator
|
| 64 |
# 'auto' auto-detects GPU, set to "cpu" to force CPU inference
|
|
|
|
| 69 |
translation = translator(input_text, beam_size=5)[0]
|
| 70 |
return translation
|
| 71 |
|
| 72 |
+
@staticmethod
|
| 73 |
def quickmtdownload(model_name):
|
| 74 |
from quickmt.hub import hf_download
|
| 75 |
from pathlib import Path
|