CoderBak commited on
Commit
d5f22ca
·
verified ·
1 Parent(s): 828972c

Resolve shared cleaner modules from a Hub snapshot

Browse files
Files changed (1) hide show
  1. inference.py +5 -0
inference.py CHANGED
@@ -10,6 +10,11 @@ import unicodedata
10
  import numpy as np
11
  import torch
12
 
 
 
 
 
 
13
  from corpus_text import document_text, source_origins, word_count
14
  from language import document_language
15
 
 
10
  import numpy as np
11
  import torch
12
 
13
+ # Hub cache scripts are symlinks to blobs. Their siblings live in the snapshot.
14
+ _runtime_dir = str(pathlib.Path(__file__).absolute().parent)
15
+ if _runtime_dir not in sys.path:
16
+ sys.path.insert(0, _runtime_dir)
17
+
18
  from corpus_text import document_text, source_origins, word_count
19
  from language import document_language
20