JuliaKreutzerCohere commited on
Commit
5e6537b
·
verified ·
1 Parent(s): 40e6fd1

Upload script.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. script.py +26 -0
script.py CHANGED
@@ -1,4 +1,30 @@
1
  import os
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  import re
3
  import csv
4
  import json
 
1
  import os
2
+ import subprocess
3
+ import sys
4
+
5
+
6
+ def _install_bundled_deps() -> None:
7
+ """Install transformers from bundled wheels (eval sandbox has no PyPI access)."""
8
+ wheels_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "wheels")
9
+ if not os.path.isdir(wheels_dir):
10
+ return
11
+ subprocess.run(
12
+ [
13
+ sys.executable,
14
+ "-m",
15
+ "pip",
16
+ "install",
17
+ "-q",
18
+ "--no-index",
19
+ f"--find-links={wheels_dir}",
20
+ "transformers==4.56.2",
21
+ ],
22
+ check=True,
23
+ )
24
+
25
+
26
+ _install_bundled_deps()
27
+
28
  import re
29
  import csv
30
  import json