Skip to content

Commit

Permalink
(core) improved updateModelAvailability printout behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
amkrajewski committed Sep 2, 2024
1 parent 28fc259 commit e97998d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pysipfenn/core/pysipfenn.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,16 +246,16 @@ def updateModelAvailability(self) -> None:
if all_files.__contains__(net + '.onnx'):
detectedNets.append(net)
try:
print(f"{Fore.GREEN}{net:<45} | {netName}{Style.RESET_ALL}")
self.log(f"{Fore.GREEN}{net:<45} | {netName}{Style.RESET_ALL}")
except UnicodeEncodeError:
# Fallback to ASCII characters if Unicode encoding fails
print(f"{Fore.GREEN}+ {net:<45} | {netName}{Style.RESET_ALL}")
self.log(f"{Fore.GREEN}+ {net:<45} | {netName}{Style.RESET_ALL}")
else:
try:
print(f"{Style.DIM}{net:<45} | {netName}{Style.RESET_ALL}")
self.log(f"{Style.DIM}{net:<45} | {netName}{Style.RESET_ALL}")
except UnicodeEncodeError:
# Fallback to ASCII characters if Unicode encoding fails
print(f"{Fore.DIM}x {net:<45} | {netName}{Style.RESET_ALL}")
self.log(f"{Fore.DIM}x {net:<45} | {netName}{Style.RESET_ALL}")
self.network_list_available = detectedNets

def downloadModels(self, network: str = 'all') -> None:
Expand Down

0 comments on commit e97998d

Please sign in to comment.