Skip to content

Commit

Permalink
log further improvements. (#153)
Browse files Browse the repository at this point in the history
Signed-off-by: Rahul Tripathi <[email protected]>
Co-authored-by: Rahul Tripathi <[email protected]>
  • Loading branch information
rahul-trip and Rahul Tripathi authored Feb 14, 2024
1 parent 47f171f commit 9c6eb7f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pebblo/app/daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,33 +27,33 @@ def start():

def classifier_init():
"""Initialize topic and entity classifier."""
p_bar.write("Downloading models...")
p_bar.write("Downloading topic, entity classifier models ...")
with redirect_stdout(StringIO()), redirect_stderr(StringIO()):
from pebblo.topic_classifier.topic_classifier import TopicClassifier
from pebblo.entity_classifier.entity_classifier import EntityClassifier
p_bar.update(3)
p_bar.write("Topic Classifier Initializing.")
p_bar.write("Initializing topic classifier ...")
p_bar.update(1)

# Init TopicClassifier(This step downloads the models and put in cache)
with redirect_stdout(StringIO()), redirect_stderr(StringIO()):
_ = TopicClassifier()
p_bar.write("Topic Classifier Initialized...")
p_bar.write("Initializing topic classifier ... done")
p_bar.update(1)

p_bar.write("Entity Classifier Initializing.")
p_bar.write("Initializing entity classifier ...")
p_bar.update(1)

# Init EntityClassifier(This step downloads all necessary training models)
with redirect_stdout(StringIO()), redirect_stderr(StringIO()):
_ = EntityClassifier()
p_bar.write("Entity Classifier Initialized...")
p_bar.write("Initializing entity classifier ... done")
p_bar.update(1)


def server_start(config_details):
"""Start server."""
p_bar.write("Pebblo server Starting.")
p_bar.write("Pebblo server starting ...")
# Starting Uvicorn Service Using config details
from pebblo.app.config.service import Service
p_bar.update(1)
Expand Down

0 comments on commit 9c6eb7f

Please sign in to comment.