Upload 2 files
Browse filesFiles changed (2)
12323version https://git-lfs.github.com/spec/v1oid sha256:d98d1aef959375ad0f1bf89ef9a58b79e207afd1e47b9e9922cab5a4e2955ab0size 81747886oid sha256:d97e584e1267513494032f9b82dcdd5509fecd4d52b3963a692cdd7244271739size 8174802025 unmodified lines2627282930313280 unmodified lines11311411511611711811912012112212312412512612712812916 unmodified lines14614714813713814915015115215315415515615725 unmodified linesfrom IPython.display import displayimport win32clipboardfrom io import BytesIOfrom datetime import datetime
BASE_URL="https://api.novelai.net"
80 unmodified lines else: return image
def log_error(e, output_file_path="output_file_path"): # ํ์ฌ ์๊ฐ์ ์ป์ต๋๋ค current_time = datetime.now().strftime("%m/%d %H:%M:%S")
# ์๋ฌ ๋ก๊ทธ ๋ฉ์์ง error_message = f"#### Error occured at {current_time} ####\nError: {e}\n############################################\n"
# ์ง์ ๋ ์ถ๋ ฅ ํด๋์ error_log.txt ํ์ผ์ ์ฐ๊ธฐ with open(f"error_log.txt", "a") as file: file.write(error_message)
global access_token try: zipped_bytes = generate_image(access_token, positive, "nai-diffusion-3", "generate", params)16 unmodified lines output_file_path = "output_image.jpg" i.save(output_file_path) except Exception as e: text_output.insert(tk.END, f"Error: {e}", fg='red') button.config(state=tk.NORMAL) #text_output.insert(tk.END, f"Error: {e}", fg='red') log_error(e, "path_to_output_folder") time.sleep(random.uniform(3.0, 9.0)) button.config(state=tk.DISABLED) window.event_generate(GENERATE_EVENT, when="tail")
time.sleep(random.uniform(2.3, 6.5)) button.config(state=tk.NORMAL) if mac_var.get():Danbooru Prompt Selector/TEST/prompt_selector_auto_1129_TESTv2.exe+2-2
Danbooru Prompt Selector/TEST/prompt_selector_auto_1129_TESTv2.py+18-2