CoolFace
Apppublic

ifly/ChatGPT-Chuanhu

sourceHugging Facegpl-3.0updated 2y agoView on Hugging Face
0likes
shared.py25 linesDownload Raw Back to modules
1from modules.presets import API_URL2 3class State:4    interrupted = False5    api_url = API_URL6 7    def interrupt(self):8        self.interrupted = True9 10    def recover(self):11        self.interrupted = False12 13    def set_api_url(self, api_url):14        self.api_url = api_url15 16    def reset_api_url(self):17        self.api_url = API_URL18        return self.api_url19 20    def reset_all(self):21        self.interrupted = False22        self.api_url = API_URL23 24state = State()25