mcamargo00 commited on
Commit
cde06dc
·
verified ·
1 Parent(s): 9251b67

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -11
app.py CHANGED
@@ -20,17 +20,8 @@ import math
20
 
21
  DEVICE = torch.device("cuda" if torch.cuda.is_available() else "cpu")
22
 
23
- # --- compat shim for newer Phi-3/4 modeling files ---
24
- import transformers as _tf
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