From f153b587879badf231143855e1d9c3e9269aa9b6 Mon Sep 17 00:00:00 2001 From: daxcay Date: Sat, 15 Jun 2024 21:54:50 +0530 Subject: [PATCH] Update to remove cache --- classes/DATASET_CaptionVisualizer.py | 4 ++++ classes/DATASET_OpenAIChat.py | 5 +++++ classes/DATASET_OpenAIChatImage.py | 5 +++++ classes/DATASET_SearchAndReplace.py | 4 ++++ classes/DATASET_TXTFileSaver.py | 4 ++++ classes/DATASET_TagManipulatorByImageNames.py | 4 ++++ classes/DATASET_xCopy.py | 3 +++ 7 files changed, 29 insertions(+) diff --git a/classes/DATASET_CaptionVisualizer.py b/classes/DATASET_CaptionVisualizer.py index 001e306..de2c3b6 100644 --- a/classes/DATASET_CaptionVisualizer.py +++ b/classes/DATASET_CaptionVisualizer.py @@ -200,6 +200,10 @@ class DATASET_CaptionVisualizer: print(f"Error saving: {e}") return (["", "", ""],) + + @classmethod + def IS_CHANGED(s, Captions, WordCloudTop, NetworkGraphTop, FrequencyGraphTop): + return os.urandom(16).hex() N_CLASS_MAPPINGS = { diff --git a/classes/DATASET_OpenAIChat.py b/classes/DATASET_OpenAIChat.py index bcdb232..3b8ca21 100644 --- a/classes/DATASET_OpenAIChat.py +++ b/classes/DATASET_OpenAIChat.py @@ -1,4 +1,5 @@ from openai import OpenAI +import os class DATASET_OpenAIChat: @@ -32,6 +33,10 @@ class DATASET_OpenAIChat: return (answer,) except Exception as e: return (f"Error: {str(e)}",) + + @classmethod + def IS_CHANGED(s, model, api_url, api_key, prompt, token_length): + return os.urandom(16).hex() N_CLASS_MAPPINGS = { "DATASET_OpenAIChat": DATASET_OpenAIChat, diff --git a/classes/DATASET_OpenAIChatImage.py b/classes/DATASET_OpenAIChatImage.py index 09a08c0..cff885a 100644 --- a/classes/DATASET_OpenAIChatImage.py +++ b/classes/DATASET_OpenAIChatImage.py @@ -3,6 +3,7 @@ import io from PIL import Image import numpy as np from openai import OpenAI +import os class DATASET_OpenAIChatImage: @@ -52,6 +53,10 @@ class DATASET_OpenAIChatImage: except Exception as e: return (f"Error: {str(e)}",) + + @classmethod + def IS_CHANGED(s, image, image_detail, model, api_url, api_key, prompt, token_length): + return os.urandom(16).hex() N_CLASS_MAPPINGS = { "DATASET_OpenAIChatImage": DATASET_OpenAIChatImage, diff --git a/classes/DATASET_SearchAndReplace.py b/classes/DATASET_SearchAndReplace.py index 3835afc..6cafad3 100644 --- a/classes/DATASET_SearchAndReplace.py +++ b/classes/DATASET_SearchAndReplace.py @@ -67,6 +67,10 @@ class DATASET_SearchAndReplace: print(f"Error saving: {e}") return () + + @classmethod + def IS_CHANGED(s, TextFilePathList, SearchFor, ReplaceWith): + return os.urandom(16).hex() N_CLASS_MAPPINGS = { diff --git a/classes/DATASET_TXTFileSaver.py b/classes/DATASET_TXTFileSaver.py index 66a29fe..1ce17d4 100644 --- a/classes/DATASET_TXTFileSaver.py +++ b/classes/DATASET_TXTFileSaver.py @@ -64,6 +64,10 @@ class DATASET_TXTFileSaver: print(f"Error saving: {e}") return () + + @classmethod + def IS_CHANGED(s, content, file_name, directory, mode): + return os.urandom(16).hex() N_CLASS_MAPPINGS = { diff --git a/classes/DATASET_TagManipulatorByImageNames.py b/classes/DATASET_TagManipulatorByImageNames.py index fd832bd..d903d06 100644 --- a/classes/DATASET_TagManipulatorByImageNames.py +++ b/classes/DATASET_TagManipulatorByImageNames.py @@ -133,6 +133,10 @@ class DATASET_TagManipulatorByImageNames: print(f"Error saving: {e}") return () + + @classmethod + def IS_CHANGED(s, ImageNames, TagsDirectory, Captions, Backup): + return os.urandom(16).hex() N_CLASS_MAPPINGS = { diff --git a/classes/DATASET_xCopy.py b/classes/DATASET_xCopy.py index c099cbf..b883144 100644 --- a/classes/DATASET_xCopy.py +++ b/classes/DATASET_xCopy.py @@ -54,6 +54,9 @@ class DATASET_xCopy: return () + @classmethod + def IS_CHANGED(s, source_folder, destination_folder, mode): + return os.urandom(16).hex() N_CLASS_MAPPINGS = { "DATASET_xCopy": DATASET_xCopy,