Update app.py
Browse files
app.py
CHANGED
|
@@ -666,8 +666,10 @@ def get_latest_checkpoint():
|
|
| 666 |
checkpoints = [
|
| 667 |
filename
|
| 668 |
for filename in files
|
| 669 |
-
if
|
| 670 |
-
and
|
|
|
|
|
|
|
| 671 |
]
|
| 672 |
|
| 673 |
if not checkpoints:
|
|
|
|
| 666 |
checkpoints = [
|
| 667 |
filename
|
| 668 |
for filename in files
|
| 669 |
+
if filename.endswith(".pt")
|
| 670 |
+
and "config" not in filename
|
| 671 |
+
and "final" not in filename
|
| 672 |
+
and re.search(r"step[_-]?\d+", filename, re.IGNORECASE)
|
| 673 |
]
|
| 674 |
|
| 675 |
if not checkpoints:
|