ReyaLabColumbia commited on
Commit
5ac4683
·
verified ·
1 Parent(s): 23e6d19

Upload 2 files

Browse files
Files changed (2) hide show
  1. Colony_Analyzer_AI2_HF.py +1 -1
  2. app.py +4 -4
Colony_Analyzer_AI2_HF.py CHANGED
@@ -20,7 +20,7 @@ def cut_img(img):
20
  for j in range(j_num):
21
  cropped_img = img.crop((512*j, 512*i, 512*(j+1), 512*(i+1)))
22
  img_map[count] = cropped_img
23
- print(type(cropped_img))
24
  count += 1
25
  return img_map
26
 
 
20
  for j in range(j_num):
21
  cropped_img = img.crop((512*j, 512*i, 512*(j+1), 512*(i+1)))
22
  img_map[count] = cropped_img
23
+ #print(type(cropped_img))
24
  count += 1
25
  return img_map
26
 
app.py CHANGED
@@ -7,11 +7,11 @@ import numpy as np
7
  # Analysis function adapted from your Tkinter app
8
  def analyze_image(image, min_size, circularity):
9
  # Assume your analyzer.main accepts [image, params] format, adjust as needed
10
- processed_img = analyzer.main([image, min_size, circularity])
11
-
12
  # Convert back to RGB for display
13
- result = cv2.cvtColor(processed_img, cv2.COLOR_BGR2RGB)
14
- return Image.fromarray(result)
15
 
16
  # Create Gradio interface
17
  iface = gr.Interface(
 
7
  # Analysis function adapted from your Tkinter app
8
  def analyze_image(image, min_size, circularity):
9
  # Assume your analyzer.main accepts [image, params] format, adjust as needed
10
+ processed_img,picname, excelname = analyzer.main([image, min_size, circularity])
11
+ print(type(processed_img))
12
  # Convert back to RGB for display
13
+ #result = cv2.cvtColor(processed_img, cv2.COLOR_BGR2RGB)
14
+ return Image.fromarray(processed_img), picname, excelname
15
 
16
  # Create Gradio interface
17
  iface = gr.Interface(