K00B404 commited on
Commit
9d1bf10
1 Parent(s): 422e2f4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -24,20 +24,21 @@ def init_db(file='logs.db'):
24
  conn.close()
25
 
26
  # Log a request
27
- def log_request(prompt, is_negative, steps, cfg_scale, sampler, seed, strength, use_dev, enhance_prompt_style, enhance_prompt_option, nemo_enhance_prompt_style, use_mistral_nemo, huggingface_api_key):
28
  log_message = f"Request: prompt='{prompt}', is_negative={is_negative}, steps={steps}, cfg_scale={cfg_scale}, "
29
  log_message += f"sampler='{sampler}', seed={seed}, strength={strength}, use_dev={use_dev}, "
30
  log_message += f"enhance_prompt_style='{enhance_prompt_style}', enhance_prompt_option={enhance_prompt_option}, "
31
- log_message += f"nemo_enhance_prompt_style='{nemo_enhance_prompt_style}', use_mistral_nemo={use_mistral_nemo}"
 
32
  if huggingface_api_key:
33
- log_message += f"huggingface_api_key='{huggingface_api_key}'"
34
 
35
  conn = sqlite3.connect('acces_log.log')
36
  c = conn.cursor()
37
  c.execute("INSERT INTO logs VALUES (?, ?)", (datetime.now().isoformat(), log_message))
38
  conn.commit()
39
  conn.close()
40
-
41
  # os.makedirs('assets', exist_ok=True)
42
  if not os.path.exists('icon.png'):
43
  os.system("wget -O icon.png https://i.pinimg.com/564x/64/49/88/644988c59447eb00286834c2e70fdd6b.jpg")
 
24
  conn.close()
25
 
26
  # Log a request
27
+ def log_request(prompt, is_negative, steps, cfg_scale, sampler, seed, strength, use_dev, enhance_prompt_style, enhance_prompt_option, nemo_enhance_prompt_style, use_mistral_nemo, huggingface_api_key, use_unhinged):
28
  log_message = f"Request: prompt='{prompt}', is_negative={is_negative}, steps={steps}, cfg_scale={cfg_scale}, "
29
  log_message += f"sampler='{sampler}', seed={seed}, strength={strength}, use_dev={use_dev}, "
30
  log_message += f"enhance_prompt_style='{enhance_prompt_style}', enhance_prompt_option={enhance_prompt_option}, "
31
+ log_message += f"nemo_enhance_prompt_style='{nemo_enhance_prompt_style}', use_mistral_nemo={use_mistral_nemo}, "
32
+ log_message += f"use_unhinged={use_unhinged}"
33
  if huggingface_api_key:
34
+ log_message += f", huggingface_api_key='{huggingface_api_key}'"
35
 
36
  conn = sqlite3.connect('acces_log.log')
37
  c = conn.cursor()
38
  c.execute("INSERT INTO logs VALUES (?, ?)", (datetime.now().isoformat(), log_message))
39
  conn.commit()
40
  conn.close()
41
+
42
  # os.makedirs('assets', exist_ok=True)
43
  if not os.path.exists('icon.png'):
44
  os.system("wget -O icon.png https://i.pinimg.com/564x/64/49/88/644988c59447eb00286834c2e70fdd6b.jpg")