From 2708a40f996450fd24e3af72dfe8f75f63c430c7 Mon Sep 17 00:00:00 2001 From: 7trail <72806227+7trail@users.noreply.github.com> Date: Tue, 29 Aug 2023 17:15:45 -0500 Subject: [PATCH] Resolved unicode errors --- neural.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/neural.py b/neural.py index f5f3f4b..8c6d3b1 100644 --- a/neural.py +++ b/neural.py @@ -4,6 +4,7 @@ import requests from io import BytesIO from PIL import Image import discord +import re def create_image(links): @@ -27,7 +28,7 @@ async def Generate(prompt, channel, count=2, negativePrompt = "",size="square"): "isHd": False, "steps": 25, "cfgScale": 7.5, - "prompt": prompt, + "prompt": re.sub(r'\W+', '', prompt), "style": "anything", "layout": size, "negativePrompt": negativePrompt