bug fixes
Browse files
modules/common/file_ensurer.py
CHANGED
@@ -222,14 +222,12 @@ class FileEnsurer():
|
|
222 |
logging.debug("Running on Hugging Face, purging storage")
|
223 |
|
224 |
stuff_to_purge = [
|
225 |
-
FileEnsurer.secrets_dir,
|
226 |
-
FileEnsurer.config_dir,
|
227 |
-
FileEnsurer.archive_dir,
|
228 |
FileEnsurer.temp_file_path
|
229 |
]
|
230 |
|
231 |
stuff_to_truncate = [
|
232 |
-
FileEnsurer.output_dir
|
|
|
233 |
]
|
234 |
|
235 |
for thing in stuff_to_purge:
|
@@ -457,6 +455,9 @@ class FileEnsurer():
|
|
457 |
|
458 |
"""
|
459 |
|
|
|
|
|
|
|
460 |
archival_path = os.path.join(FileEnsurer.archive_dir, f'{module}_run_{timestamp}')
|
461 |
FileEnsurer.standard_create_directory(archival_path)
|
462 |
|
|
|
222 |
logging.debug("Running on Hugging Face, purging storage")
|
223 |
|
224 |
stuff_to_purge = [
|
|
|
|
|
|
|
225 |
FileEnsurer.temp_file_path
|
226 |
]
|
227 |
|
228 |
stuff_to_truncate = [
|
229 |
+
FileEnsurer.output_dir,
|
230 |
+
FileEnsurer.archive_dir
|
231 |
]
|
232 |
|
233 |
for thing in stuff_to_purge:
|
|
|
455 |
|
456 |
"""
|
457 |
|
458 |
+
if(FileEnsurer.is_hugging_space()):
|
459 |
+
return
|
460 |
+
|
461 |
archival_path = os.path.join(FileEnsurer.archive_dir, f'{module}_run_{timestamp}')
|
462 |
FileEnsurer.standard_create_directory(archival_path)
|
463 |
|
modules/common/translator.py
CHANGED
@@ -357,6 +357,8 @@ class Translator:
|
|
357 |
Translator.error_text = []
|
358 |
Translator.openai_translation_batches = []
|
359 |
Translator.gemini_translation_batches = []
|
|
|
|
|
360 |
Translator.num_occurred_malformed_batches = 0
|
361 |
Translator.translation_print_result = ""
|
362 |
Translator.TRANSLATION_METHOD = "deepl"
|
|
|
357 |
Translator.error_text = []
|
358 |
Translator.openai_translation_batches = []
|
359 |
Translator.gemini_translation_batches = []
|
360 |
+
Translator.deepl_translation_batches = []
|
361 |
+
Translator.google_translate_translation_batches = []
|
362 |
Translator.num_occurred_malformed_batches = 0
|
363 |
Translator.translation_print_result = ""
|
364 |
Translator.TRANSLATION_METHOD = "deepl"
|