mirror of
https://github.com/SikongJueluo/Mini-Nav.git
synced 2026-03-12 12:25:32 +08:00
refactor(ui): replace tqdm with rich for enhanced console output
This commit is contained in:
@@ -6,7 +6,7 @@ from database import db_manager
|
||||
from PIL import Image
|
||||
from PIL.PngImagePlugin import PngImageFile
|
||||
from torch import nn
|
||||
from tqdm.auto import tqdm
|
||||
from rich.progress import track
|
||||
from transformers import (
|
||||
AutoImageProcessor,
|
||||
AutoModel,
|
||||
@@ -93,7 +93,7 @@ class FeatureRetrieval:
|
||||
self.processor, self.model, images, batch_size=batch_size
|
||||
)
|
||||
|
||||
for i in tqdm(range(len(labels)), desc="Storing to database"):
|
||||
for i in track(range(len(labels)), description="Storing to database"):
|
||||
batch_label = labels[i] if label_map is None else label_map[labels[i]]
|
||||
|
||||
# Store to database
|
||||
|
||||
Reference in New Issue
Block a user