Spaces:
Running
Running
freemt
commited on
Commit
·
2d26d33
1
Parent(s):
0ea83d5
Update
Browse files- mlbee/home.py +18 -16
- poetry.lock +13 -1
- pyproject.toml +1 -0
- requirements.txt +1 -0
mlbee/home.py
CHANGED
@@ -116,24 +116,26 @@ def home(): # noqa
|
|
116 |
logger.debug(" df.empty, return")
|
117 |
return None
|
118 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
119 |
# only show this for upload
|
120 |
if state.ns.sourcetype in ["upload"]:
|
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 |
-
time0 = len12 * 0.4
|
125 |
-
time1 = len12 * 1
|
126 |
-
eta = pendulum.now() + pendulum.duration(seconds=len12 * 0.66)
|
127 |
-
|
128 |
-
in_words0 = pendulum.duration(seconds=time0).in_words()
|
129 |
-
in_words1 = pendulum.duration(seconds=time1).in_words()
|
130 |
-
diff_for_humans = eta.diff_for_humans()
|
131 |
-
dt_str = eta.to_datetime_string()
|
132 |
-
timezone_name = eta.timezone_name
|
133 |
-
_ = (
|
134 |
-
f"Estimated time to complete: {in_words0} to {in_words1}; "
|
135 |
-
f"ETA: {diff_for_humans} ({dt_str} {timezone_name}) "
|
136 |
-
)
|
137 |
st.info(_)
|
138 |
_ = st.expander("to be aligned", expanded=False)
|
139 |
with _:
|
|
|
116 |
logger.debug(" df.empty, return")
|
117 |
return None
|
118 |
|
119 |
+
# print estimated completion time
|
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 |
+
time0 = len12 * 0.4
|
124 |
+
time1 = len12 * 1
|
125 |
+
eta = pendulum.now() + pendulum.duration(seconds=len12 * 0.66)
|
126 |
+
|
127 |
+
in_words0 = pendulum.duration(seconds=time0).in_words()
|
128 |
+
in_words1 = pendulum.duration(seconds=time1).in_words()
|
129 |
+
diff_for_humans = eta.diff_for_humans()
|
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 |
+
)
|
136 |
+
|
137 |
# only show this for upload
|
138 |
if state.ns.sourcetype in ["upload"]:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
139 |
st.info(_)
|
140 |
_ = st.expander("to be aligned", expanded=False)
|
141 |
with _:
|
poetry.lock
CHANGED
@@ -2018,6 +2018,14 @@ python-versions = ">=3.5"
|
|
2018 |
[package.extras]
|
2019 |
dev = ["pytest (>=4.6.2)", "black (>=19.3b0)"]
|
2020 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021 |
[[package]]
|
2022 |
name = "zipp"
|
2023 |
version = "3.8.0"
|
@@ -2033,7 +2041,7 @@ testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-
|
|
2033 |
[metadata]
|
2034 |
lock-version = "1.1"
|
2035 |
python-versions = "^3.8.3"
|
2036 |
-
content-hash = "
|
2037 |
|
2038 |
[metadata.files]
|
2039 |
about-time = [
|
@@ -3496,6 +3504,10 @@ win32-setctime = [
|
|
3496 |
{file = "win32_setctime-1.1.0-py3-none-any.whl", hash = "sha256:231db239e959c2fe7eb1d7dc129f11172354f98361c4fa2d6d2d7e278baa8aad"},
|
3497 |
{file = "win32_setctime-1.1.0.tar.gz", hash = "sha256:15cf5750465118d6929ae4de4eb46e8edae9a5634350c01ba582df868e932cb2"},
|
3498 |
]
|
|
|
|
|
|
|
|
|
3499 |
zipp = [
|
3500 |
{file = "zipp-3.8.0-py3-none-any.whl", hash = "sha256:c4f6e5bbf48e74f7a38e7cc5b0480ff42b0ae5178957d564d18932525d5cf099"},
|
3501 |
{file = "zipp-3.8.0.tar.gz", hash = "sha256:56bf8aadb83c24db6c4b577e13de374ccfb67da2078beba1d037c17980bf43ad"},
|
|
|
2018 |
[package.extras]
|
2019 |
dev = ["pytest (>=4.6.2)", "black (>=19.3b0)"]
|
2020 |
|
2021 |
+
[[package]]
|
2022 |
+
name = "xlsxwriter"
|
2023 |
+
version = "3.0.3"
|
2024 |
+
description = "A Python module for creating Excel XLSX files."
|
2025 |
+
category = "main"
|
2026 |
+
optional = false
|
2027 |
+
python-versions = ">=3.4"
|
2028 |
+
|
2029 |
[[package]]
|
2030 |
name = "zipp"
|
2031 |
version = "3.8.0"
|
|
|
2041 |
[metadata]
|
2042 |
lock-version = "1.1"
|
2043 |
python-versions = "^3.8.3"
|
2044 |
+
content-hash = "4d98009b5b4b96e19c21e205e88a6e856ef4321da82fbb7a58134b86f39b89a8"
|
2045 |
|
2046 |
[metadata.files]
|
2047 |
about-time = [
|
|
|
3504 |
{file = "win32_setctime-1.1.0-py3-none-any.whl", hash = "sha256:231db239e959c2fe7eb1d7dc129f11172354f98361c4fa2d6d2d7e278baa8aad"},
|
3505 |
{file = "win32_setctime-1.1.0.tar.gz", hash = "sha256:15cf5750465118d6929ae4de4eb46e8edae9a5634350c01ba582df868e932cb2"},
|
3506 |
]
|
3507 |
+
xlsxwriter = [
|
3508 |
+
{file = "XlsxWriter-3.0.3-py3-none-any.whl", hash = "sha256:df0aefe5137478d206847eccf9f114715e42aaea077e6a48d0e8a2152e983010"},
|
3509 |
+
{file = "XlsxWriter-3.0.3.tar.gz", hash = "sha256:e89f4a1d2fa2c9ea15cde77de95cd3fd8b0345d0efb3964623f395c8c4988b7f"},
|
3510 |
+
]
|
3511 |
zipp = [
|
3512 |
{file = "zipp-3.8.0-py3-none-any.whl", hash = "sha256:c4f6e5bbf48e74f7a38e7cc5b0480ff42b0ae5178957d564d18932525d5cf099"},
|
3513 |
{file = "zipp-3.8.0.tar.gz", hash = "sha256:56bf8aadb83c24db6c4b577e13de374ccfb67da2078beba1d037c17980bf43ad"},
|
pyproject.toml
CHANGED
@@ -29,6 +29,7 @@ hf-model-s-cpu = "^0.1.1"
|
|
29 |
cchardet = "^2.1.7"
|
30 |
streamlit-aggrid = "^0.2.3"
|
31 |
typer = "^0.4.1"
|
|
|
32 |
|
33 |
[tool.poe.executor]
|
34 |
type = "poetry"
|
|
|
29 |
cchardet = "^2.1.7"
|
30 |
streamlit-aggrid = "^0.2.3"
|
31 |
typer = "^0.4.1"
|
32 |
+
XlsxWriter = "^3.0.3"
|
33 |
|
34 |
[tool.poe.executor]
|
35 |
type = "poetry"
|
requirements.txt
CHANGED
@@ -146,4 +146,5 @@ wcwidth==0.2.5; python_full_version >= "3.6.2" and python_version >= "3.8"
|
|
146 |
webencodings==0.5.1; python_version >= "3.7"
|
147 |
widgetsnbextension==3.6.0; python_version >= "3.7"
|
148 |
win32-setctime==1.1.0; sys_platform == "win32" and python_version >= "3.5"
|
|
|
149 |
zipp==3.8.0; python_version < "3.9" and python_version >= "3.7"
|
|
|
146 |
webencodings==0.5.1; python_version >= "3.7"
|
147 |
widgetsnbextension==3.6.0; python_version >= "3.7"
|
148 |
win32-setctime==1.1.0; sys_platform == "win32" and python_version >= "3.5"
|
149 |
+
xlsxwriter==3.0.3; python_version >= "3.4"
|
150 |
zipp==3.8.0; python_version < "3.9" and python_version >= "3.7"
|