Skip to content

Commit

Permalink
format monitoring_main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
nanoGimlet committed Nov 11, 2022
1 parent fe1525c commit b8d87c2
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions monitoring_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,20 @@ def on_created(self, event):
filename = os.path.basename(filepath)
print(f"{filename} created")
if '.txt' in filename:
if filename == 'finish.txt': mapping()
elif filename == 'sample_trim.png': recognize(model, opt, converter)

if filename == 'finish.txt':
mapping()
elif filename == 'sample_trim.png':
recognize(model, opt, converter)

def on_modified(self, event):
filepath = event.src_path
filename = os.path.basename(filepath)

def on_deleted(self, event):
filepath = event.src_path
filename = os.path.basename(filepath)



if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('--image_folder', required=True,
Expand Down Expand Up @@ -74,7 +75,7 @@ def on_deleted(self, event):
help='the number of output channel of Feature extractor')
parser.add_argument('--hidden_size', type=int, default=256,
help='the size of the LSTM hidden state')

model = None
opt = parser.parse_args()
converter = None
Expand Down

0 comments on commit b8d87c2

Please sign in to comment.