File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -105,10 +105,6 @@ class VulcanConsole(App):
105105 width: 100%;
106106 }
107107
108- #history_title {
109- color: #ffffff;
110- }
111-
112108 #variables {
113109 color: #ffffff;
114110 }
@@ -134,8 +130,13 @@ def __init__(
134130 user_context : str = "" ,
135131 main_node = None ,
136132 ):
133+ # Used to set the same textual colors in a docker container
137134 os .environ .setdefault ("COLORTERM" , "truecolor" )
138135 textual_constants .COLOR_SYSTEM = "truecolor"
136+
137+ # Keep Hugging Face download progress bars out of redirected Textual stdout/stderr.
138+ os .environ .setdefault ("HF_HUB_DISABLE_PROGRESS_BARS" , "1" )
139+
139140 super ().__init__ () # Textual lib
140141
141142 # -- Main variables --
Original file line number Diff line number Diff line change 1212# See the License for the specific language governing permissions and
1313# limitations under the License.
1414
15- import os
1615from typing import Optional
1716
1817import numpy as np
19-
20- # Keep Hugging Face download progress bars out of redirected Textual stdout/stderr.
21- os .environ .setdefault ("HF_HUB_DISABLE_PROGRESS_BARS" , "1" )
22-
2318from sentence_transformers import SentenceTransformer
2419
2520from vulcanai .console .logger import VulcanAILogger
2621
27- _HF_DOWNLOAD_INFO_PRINTED = False
28-
2922
3023def info_msg_hf_model_loading (model_name : str , logger : Optional [VulcanAILogger ] = None ) -> None :
31- global _HF_DOWNLOAD_INFO_PRINTED
24+ hf_download_info_printed = False
3225
33- if _HF_DOWNLOAD_INFO_PRINTED :
26+ if hf_download_info_printed :
3427 return
3528
3629 msg = f"Hugging Face is loading '{ model_name } '. If the model is not cached yet, files are being downloaded..."
3730 if logger is not None :
3831 logger .log_console (msg )
3932 else :
40- VulcanAILogger .log_console (msg )
33+ VulcanAILogger .default (). log_console (msg )
4134
42- _HF_DOWNLOAD_INFO_PRINTED = True
35+ hf_download_info_printed = True
4336
4437
4538class SBERTEmbedder :
You can’t perform that action at this time.
0 commit comments