Skip to content

Commit

Permalink
Improve progress bar
Browse files Browse the repository at this point in the history
  • Loading branch information
kwalcock committed Mar 8, 2024
1 parent 1343d5f commit 6bbf002
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion belief_pipeline/sentiment_input_stage.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@ def mk_data_frame(self, file_name: str) -> DataFrame:

def run(self) -> DataFrame:
data_frame = self.mk_data_frame(self.file_name)
data_frame = data_frame[0:1000] # TODO: remove
# data_frame = data_frame[0:1000] # TODO: remove
return data_frame
2 changes: 1 addition & 1 deletion belief_pipeline/sentiment_sentiment_stage.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def __init__(self, model_name: str, belief_column_name: str = "belief", text_col

def run(self, data_frame: DataFrame) -> DataFrame:
sentiment_scores = []
for _, row in tqdm(data_frame.iterrows(), desc=f"Calculating sentiment"):
for _, row in tqdm(data_frame.iterrows(), total=data_frame.shape[0], desc=f"Calculating sentiment"):
belief = row[self.belief_column_name]
if belief:
text = row[self.text_column_name]
Expand Down

0 comments on commit 6bbf002

Please sign in to comment.