Update human_text_detect.py
Browse files- human_text_detect.py +5 -3
human_text_detect.py
CHANGED
|
@@ -93,10 +93,12 @@ def detect_human_text(model_name, topic, text):
|
|
| 93 |
min_tokens_per_sentence = 10
|
| 94 |
max_tokens_per_sentence = 100
|
| 95 |
|
| 96 |
-
cache_dir = f"/cacheHuggingface/{model_name}"
|
|
|
|
|
|
|
| 97 |
# Use a writable directory inside the Hugging Face Space
|
| 98 |
-
os.makedirs("/cacheHuggingface/PHI2", exist_ok=True)
|
| 99 |
-
os.makedirs("/cacheHuggingface/GPT2XL", exist_ok=True)
|
| 100 |
|
| 101 |
# Init model
|
| 102 |
print('Init model')
|
|
|
|
| 93 |
min_tokens_per_sentence = 10
|
| 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)
|
| 101 |
+
os.makedirs("/tmp/cacheHuggingface/GPT2XL", exist_ok=True)
|
| 102 |
|
| 103 |
# Init model
|
| 104 |
print('Init model')
|