Spaces:
Sleeping
Sleeping
Merge branch 'main' of github.com:ffreemt/mlbee
Browse files- mlbee/home.py +19 -3
- mlbee/utils.py +1 -1
- t1 +0 -1
mlbee/home.py
CHANGED
@@ -5,6 +5,7 @@ org ezbee_page.py.
|
|
5 |
# pylint: disable=invalid-name
|
6 |
# pylint: disable=too-many-locals, too-many-return-statements, too-many-branches, too-many-statements
|
7 |
import base64
|
|
|
8 |
import inspect
|
9 |
import io
|
10 |
|
@@ -120,9 +121,23 @@ def home(): # noqa
|
|
120 |
len1 = len([elm.strip() for elm in list1 if elm.strip()])
|
121 |
len2 = len([elm.strip() for elm in list2 if elm.strip()])
|
122 |
len12 = len1 + len2
|
123 |
-
|
124 |
-
|
125 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
|
127 |
in_words0 = pendulum.duration(seconds=time0).in_words()
|
128 |
in_words1 = pendulum.duration(seconds=time1).in_words()
|
@@ -130,6 +145,7 @@ def home(): # noqa
|
|
130 |
dt_str = eta.to_datetime_string()
|
131 |
timezone_name = eta.timezone_name
|
132 |
_ = (
|
|
|
133 |
f"Estimated time to complete: {in_words0} to {in_words1}; "
|
134 |
f"ETA: {diff_for_humans} ({dt_str} {timezone_name}) "
|
135 |
)
|
|
|
5 |
# pylint: disable=invalid-name
|
6 |
# pylint: disable=too-many-locals, too-many-return-statements, too-many-branches, too-many-statements
|
7 |
import base64
|
8 |
+
import platform
|
9 |
import inspect
|
10 |
import io
|
11 |
|
|
|
121 |
len1 = len([elm.strip() for elm in list1 if elm.strip()])
|
122 |
len2 = len([elm.strip() for elm in list2 if elm.strip()])
|
123 |
len12 = len1 + len2
|
124 |
+
|
125 |
+
time_min = 0.4
|
126 |
+
time_max = 1
|
127 |
+
time_av = .66
|
128 |
+
|
129 |
+
uname = platform.uname()
|
130 |
+
if "amz2" in uname.release or "forindo" in uname.node:
|
131 |
+
time_min /= 12
|
132 |
+
time_max /= 12
|
133 |
+
time_av /= 12
|
134 |
+
|
135 |
+
# time0 = len12 * 0.4
|
136 |
+
# time1 = len12 * 1
|
137 |
+
# eta = pendulum.now() + pendulum.duration(seconds=len12 * 0.66)
|
138 |
+
time0 = len12 * time_min
|
139 |
+
time1 = len12 * time_max
|
140 |
+
eta = pendulum.now() + pendulum.duration(seconds=len12 * time_av)
|
141 |
|
142 |
in_words0 = pendulum.duration(seconds=time0).in_words()
|
143 |
in_words1 = pendulum.duration(seconds=time1).in_words()
|
|
|
145 |
dt_str = eta.to_datetime_string()
|
146 |
timezone_name = eta.timezone_name
|
147 |
_ = (
|
148 |
+
f"Running in {uname.node} -- "
|
149 |
f"Estimated time to complete: {in_words0} to {in_words1}; "
|
150 |
f"ETA: {diff_for_humans} ({dt_str} {timezone_name}) "
|
151 |
)
|
mlbee/utils.py
CHANGED
@@ -29,7 +29,7 @@ msg = dedent(
|
|
29 |
).strip()
|
30 |
msg = dedent(
|
31 |
"""
|
32 |
-
a multilingual (
|
33 |
aligner based on machine learning
|
34 |
|
35 |
It takes about 1-2 s to process a pair of blocks (be it
|
|
|
29 |
).strip()
|
30 |
msg = dedent(
|
31 |
"""
|
32 |
+
a multilingual (50+ language pairs) dualtext
|
33 |
aligner based on machine learning
|
34 |
|
35 |
It takes about 1-2 s to process a pair of blocks (be it
|
t1
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
t1
|
|
|
|