From 000f65a2efaf3550a0d2ccd7260d280e5dcc2d92 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Tue, 18 Apr 2023 04:01:14 -0300 Subject: [PATCH] Delete unused file --- modules/dirty_patch_gradio.py | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 modules/dirty_patch_gradio.py diff --git a/modules/dirty_patch_gradio.py b/modules/dirty_patch_gradio.py deleted file mode 100644 index 83e4a5d..0000000 --- a/modules/dirty_patch_gradio.py +++ /dev/null @@ -1,18 +0,0 @@ -import importlib -import pathlib - - -file_path = pathlib.Path(importlib.util.find_spec("gradio").submodule_search_locations[0]) / "strings.py" - -with open(file_path, 'r') as f: - contents = f.read() - -new_contents = contents.replace('threading.Thread(target=get_updated_messaging, args=(en,)).start()', '') -if contents != new_contents: - print('Patching gradio to prevent it from calling home every time it gets imported...') - try: - # This is dirty but harmless. - with open(file_path, 'w') as f: - f.write(new_contents) - except: - pass