sab commited on
Commit
bf90ab3
β€’
1 Parent(s): 6d68146
Files changed (2) hide show
  1. README.md +1 -1
  2. app.py +1 -5
README.md CHANGED
@@ -4,7 +4,7 @@ emoji: πŸ‘
4
  colorFrom: blue
5
  colorTo: green
6
  sdk: gradio
7
- sdk_version: 5.5.0
8
  app_file: app.py
9
  pinned: false
10
  license: apache-2.0
 
4
  colorFrom: blue
5
  colorTo: green
6
  sdk: gradio
7
+ sdk_version: 4.42.0
8
  app_file: app.py
9
  pinned: false
10
  license: apache-2.0
app.py CHANGED
@@ -3,13 +3,11 @@ import gradio as gr
3
  from gradio_imageslider import ImageSlider
4
  from loadimg import load_img
5
 
6
- """
7
  import requests
8
  import base64
9
  from PIL import Image
10
  from io import BytesIO
11
  import numpy as np
12
- """
13
 
14
  output_folder = 'output_images'
15
  if not os.path.exists(output_folder):
@@ -27,8 +25,6 @@ def fn(image):
27
 
28
 
29
  def process(image):
30
- return image
31
- '''
32
  def numpy_to_pil(image):
33
  """Convert a numpy array to a PIL Image."""
34
  if image.dtype == np.uint8: # Most common case
@@ -49,7 +45,7 @@ def process(image):
49
  processed_image_b64 = result["processed_image"]
50
  processed_image = Image.open(BytesIO(base64.b64decode(processed_image_b64)))
51
  return processed_image # Return the original and processed images
52
- '''
53
 
54
  def process_file(f):
55
  name_path = f.rsplit(".", 1)[0] + ".png"
 
3
  from gradio_imageslider import ImageSlider
4
  from loadimg import load_img
5
 
 
6
  import requests
7
  import base64
8
  from PIL import Image
9
  from io import BytesIO
10
  import numpy as np
 
11
 
12
  output_folder = 'output_images'
13
  if not os.path.exists(output_folder):
 
25
 
26
 
27
  def process(image):
 
 
28
  def numpy_to_pil(image):
29
  """Convert a numpy array to a PIL Image."""
30
  if image.dtype == np.uint8: # Most common case
 
45
  processed_image_b64 = result["processed_image"]
46
  processed_image = Image.open(BytesIO(base64.b64decode(processed_image_b64)))
47
  return processed_image # Return the original and processed images
48
+
49
 
50
  def process_file(f):
51
  name_path = f.rsplit(".", 1)[0] + ".png"