Fix CommitScheduler helper SyntaxError
Browse files
app.py
CHANGED
|
@@ -4,7 +4,8 @@ import threading
|
|
| 4 |
from pathlib import Path
|
| 5 |
|
| 6 |
try:
|
| 7 |
-
|
|
|
|
| 8 |
CommitScheduler = None # type: ignore
|
| 9 |
|
| 10 |
|
|
@@ -32,6 +33,7 @@ def make_scheduler(repo_id: str, log_folder: Path):
|
|
| 32 |
print(f"CommitScheduler disabled: {exc}")
|
| 33 |
return _LocalScheduler()
|
| 34 |
|
|
|
|
| 35 |
# Use a pipeline as a high-level helper
|
| 36 |
from transformers import pipeline
|
| 37 |
import torch
|
|
|
|
| 4 |
from pathlib import Path
|
| 5 |
|
| 6 |
try:
|
| 7 |
+
from huggingface_hub import CommitScheduler
|
| 8 |
+
except Exception: # pragma: no cover
|
| 9 |
CommitScheduler = None # type: ignore
|
| 10 |
|
| 11 |
|
|
|
|
| 33 |
print(f"CommitScheduler disabled: {exc}")
|
| 34 |
return _LocalScheduler()
|
| 35 |
|
| 36 |
+
|
| 37 |
# Use a pipeline as a high-level helper
|
| 38 |
from transformers import pipeline
|
| 39 |
import torch
|