EnigmaOfTheWorld commited on
Commit
527aabe
β€’
1 Parent(s): 8f169b1

Added logging uploaded app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -18,6 +18,7 @@ from serpapi import GoogleSearch
18
  from base64 import b64encode
19
  from pathlib import Path
20
  import openai
 
21
 
22
  try:
23
  import face_recognition
@@ -28,6 +29,8 @@ import numpy as np
28
  from PIL import Image
29
  import cv2
30
 
 
 
31
  print("Hello")
32
  current_time = time.asctime()
33
 
@@ -79,6 +82,7 @@ def transform_ncuda(img,prompt,cfg=8.0,stps=30,sc=0.8):
79
  return img2
80
  except Exception as e:
81
  print(f'Caught error: {e}')
 
82
  # img2.save(str(artifact.seed)+ "-img2img.png") # Save our generated image with its seed number as the filename and the img2img suffix so that we know this is our transformed image.
83
 
84
 
 
18
  from base64 import b64encode
19
  from pathlib import Path
20
  import openai
21
+ import logging
22
 
23
  try:
24
  import face_recognition
 
29
  from PIL import Image
30
  import cv2
31
 
32
+ logging.basicConfig(level=logging.DEBUG,filename="logger.log",mode="a")
33
+
34
  print("Hello")
35
  current_time = time.asctime()
36
 
 
82
  return img2
83
  except Exception as e:
84
  print(f'Caught error: {e}')
85
+ logging.warn(f'Caught error: {e}')
86
  # img2.save(str(artifact.seed)+ "-img2img.png") # Save our generated image with its seed number as the filename and the img2img suffix so that we know this is our transformed image.
87
 
88