Skip to content

Commit

Permalink
Merge pull request #239 from Aydinhamedi/Beta-b
Browse files Browse the repository at this point in the history
Beta b
  • Loading branch information
Aydinhamedi committed Apr 4, 2024
2 parents c2ac36b + 9ec545c commit ab47217
Show file tree
Hide file tree
Showing 7 changed files with 9,488 additions and 7,252 deletions.
2 changes: 1 addition & 1 deletion .idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4,082 changes: 2,989 additions & 1,093 deletions BETA_E_Model_T&T.ipynb

Large diffs are not rendered by default.

12,640 changes: 6,490 additions & 6,150 deletions Model_T&T.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Utils/Other.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,4 +162,4 @@ def print_optimizer_info(model):
for param, value in model.optimizer.get_config().items():
print_Color(f"~* <Opt> -- ~*{param}: ~*{value}", ["cyan", "light_cyan", "green"], advanced_mode=True)
else:
print_Color("No optimizer found in the model.", ["red"])
print_Color("No optimizer found in the model.", ["red"])
6 changes: 4 additions & 2 deletions Utils/Timeout_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import queue
import keyboard


class TimeoutInput:
"""
A class to get user input with a timeout.
Expand All @@ -24,9 +25,9 @@ def __init__(self, prompt, timeout, default_var, timeout_message="\nTimeout!"):

def get_input(self):
"""Get user input in a non-blocking manner."""
print(self.prompt, end='', flush=True)
print(self.prompt, end="", flush=True)
while not self.stop_thread:
if keyboard.is_pressed('\n'):
if keyboard.is_pressed("\n"):
line = input()
if line:
self.input_queue.put(line.strip())
Expand All @@ -50,6 +51,7 @@ def run(self):
self.user_input = self.input_queue.get()
return {"user_input": self.user_input, "input_time": self.timeout, "default_var_used": False}


# Example usage
if __name__ == "__main__":
timeout_input = TimeoutInput("Enter something: ", 5, "default", "\nTimeout from TimeoutInput!")
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ hyperas==0.4.1
imbalanced-learn==0.11.0
keras==2.10.0
keras-efficientnet-v2==1.2.2
keyboard==0.13.5
loguru==0.5.3
matplotlib==3.7.2
model-profiler==1.1.8
Expand Down

0 comments on commit ab47217

Please sign in to comment.