Upload app.py
Browse files
app.py
CHANGED
@@ -20,17 +20,8 @@ import math
|
|
20 |
|
21 |
DEVICE = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
22 |
|
23 |
-
|
24 |
-
|
25 |
-
# Some HF model repos do: `from transformers.utils import LossKwargs`
|
26 |
-
# Older/newer lib versions may not re-export it, so we provide a fallback.
|
27 |
-
if not hasattr(_tf.utils, "LossKwargs"):
|
28 |
-
from typing import Dict, Any
|
29 |
-
class _LossKwargs(dict):
|
30 |
-
"""Duck-typed placeholder; used only for type hints / Unpack at runtime."""
|
31 |
-
pass
|
32 |
-
_tf.utils.LossKwargs = _LossKwargs
|
33 |
-
# -----------------------------------------------------
|
34 |
|
35 |
|
36 |
# Set up logging
|
|
|
20 |
|
21 |
DEVICE = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
22 |
|
23 |
+
|
24 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
|
26 |
|
27 |
# Set up logging
|