Xintao commited on
Commit
f6a7541
1 Parent(s): b261577

update scale limit

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -48,6 +48,8 @@ os.makedirs('output', exist_ok=True)
48
  def inference(img, version, scale):
49
  # weight /= 100
50
  print(img, version, scale)
 
 
51
  try:
52
  extension = os.path.splitext(os.path.basename(str(img)))[1]
53
  img = cv2.imread(img, cv2.IMREAD_UNCHANGED)
 
48
  def inference(img, version, scale):
49
  # weight /= 100
50
  print(img, version, scale)
51
+ if scale > 10:
52
+ scale = 10 # avoid too large scale value
53
  try:
54
  extension = os.path.splitext(os.path.basename(str(img)))[1]
55
  img = cv2.imread(img, cv2.IMREAD_UNCHANGED)