Skip to content

Commit

Permalink
(core) added NN id to the Calculator's updateModelAvailability pr…
Browse files Browse the repository at this point in the history
…intout
  • Loading branch information
amkrajewski committed Aug 30, 2024
1 parent 7519c37 commit 28a66d3
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 @@ -212,16 +212,16 @@ def updateModelAvailability(self) -> None:
if all_files.__contains__(net + '.onnx'):
detectedNets.append(net)
try:
print(f"{Fore.GREEN}{netName}{Style.RESET_ALL}")
print(f"{Fore.GREEN}{net:<45} | {netName}{Style.RESET_ALL}")
except UnicodeEncodeError:
# Fallback to ASCII characters if Unicode encoding fails
print(f"{Fore.GREEN}+ {netName}{Style.RESET_ALL}")
print(f"{Fore.GREEN}+ {net:<45} | {netName}{Style.RESET_ALL}")
else:
try:
print(f"{Style.DIM}{netName}{Style.RESET_ALL}")
print(f"{Style.DIM}{net:<45} | {netName}{Style.RESET_ALL}")
except UnicodeEncodeError:
# Fallback to ASCII characters if Unicode encoding fails
print(f"{Fore.DIM}x {netName}{Style.RESET_ALL}")
print(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 28a66d3

Please sign in to comment.