sab commited on
Commit
6d68146
1 Parent(s): fb68583
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -3,11 +3,13 @@ import gradio as gr
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,6 +27,8 @@ def fn(image):
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,7 +49,7 @@ def process(image):
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"
 
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
 
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
  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"