Update human_text_detect.py
Browse files- human_text_detect.py +2 -1
human_text_detect.py
CHANGED
@@ -94,7 +94,8 @@ def detect_human_text(model_name, topic, text):
|
|
94 |
max_tokens_per_sentence = 100
|
95 |
|
96 |
cache_dir = f"/tmp/cacheHuggingface/{model_name}"
|
97 |
-
|
|
|
98 |
print('Create dir')
|
99 |
# Use a writable directory inside the Hugging Face Space
|
100 |
os.makedirs("/tmp/cacheHuggingface/PHI2", exist_ok=True)
|
|
|
94 |
max_tokens_per_sentence = 100
|
95 |
|
96 |
cache_dir = f"/tmp/cacheHuggingface/{model_name}"
|
97 |
+
os.environ["TRANSFORMERS_CACHE"] = cache_dir
|
98 |
+
|
99 |
print('Create dir')
|
100 |
# Use a writable directory inside the Hugging Face Space
|
101 |
os.makedirs("/tmp/cacheHuggingface/PHI2", exist_ok=True)
|