Skip to content

Commit 6da70a2

Browse files
bdu91LIT team
authored and
LIT team
committed
Always use tqdm for progress indicator in LIT notebook.
PiperOrigin-RevId: 691453044
1 parent 40f74ce commit 6da70a2

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

lit_nlp/notebook.py

+3-7
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,18 @@
2222
from lit_nlp import server_config
2323
from lit_nlp.api import layout
2424
from lit_nlp.lib import wsgi_serving
25+
from tqdm import notebook
2526

2627
JsonDict = Mapping[str, Any]
2728

28-
is_colab = False
2929
try:
3030
import google.colab # pylint: disable=g-import-not-at-top,unused-import
3131
from google.colab import output # pylint: disable=g-import-not-at-top,unused-import # pytype: disable=import-error
3232
is_colab = True
33-
# Can disable import error as this package is always
34-
# included in colab kernels.
35-
from colabtools import interactive_widgets # pylint: disable=g-import-not-at-top # pytype: disable=import-error
36-
progress_indicator = interactive_widgets.ProgressIter
3733
except (ImportError, ModuleNotFoundError):
38-
from tqdm import notebook # pylint: disable=g-import-not-at-top
39-
progress_indicator = notebook.tqdm
34+
is_colab = False
4035

36+
progress_indicator = notebook.tqdm
4137
modules = layout.LitModuleName
4238

4339
LIT_NOTEBOOK_LAYOUT = layout.LitCanonicalLayout(

0 commit comments

Comments
 (0)