Skip to content

Commit

Permalink
fix: Removes previous models
Browse files Browse the repository at this point in the history
Checks previously downloaded models and removes them before downloading new ones. Fixes the issue #33
  • Loading branch information
Kohulan authored Mar 23, 2023
1 parent 71acf86 commit fb9b858
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion DECIMER/decimer.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
model_path = str(default_path) + "/DECIMER_model/"

# download models to a default location
if not os.path.exists(model_path):
if os.path.exists(model_path):
shutil.rmtree(model_path)
config.download_trained_weights(model_url, default_path)


Expand Down

0 comments on commit fb9b858

Please sign in to comment.