mirror of
https://github.com/wassname/Clover-Edition.git
synced 2026-09-12 12:04:39 +08:00
Catch pastebin download errors.
This commit is contained in:
@@ -28,8 +28,6 @@ colors=config["Colors"]
|
||||
|
||||
os.environ["TF_CPP_MIN_LOG_LEVEL"] = settings["log-level"]
|
||||
|
||||
if not Path('prompts', 'Anime').exists():
|
||||
import pastebin
|
||||
|
||||
#ECMA-48 set graphics codes for the curious. Check out "man console_codes"
|
||||
def colPrint(str, col='0', wrap=True):
|
||||
@@ -77,6 +75,11 @@ def getGenerator():
|
||||
top_k=settings.getint("top-keks"),
|
||||
top_p=settings.getfloat("top-p"))
|
||||
|
||||
if not Path('prompts', 'Anime').exists():
|
||||
try:
|
||||
import pastebin
|
||||
except:
|
||||
colPrint("Failed to scrape pastebin, possible connection issue.\nTry again later. Continuing without downloading prompts...", colors['error'])
|
||||
|
||||
def play():
|
||||
story_manager = UnconstrainedStoryManager(getGenerator())
|
||||
|
||||
Reference in New Issue
Block a user