fjenett commited on
Commit
ff771ad
1 Parent(s): 129700e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -43,12 +43,10 @@ def detect_ellipses(img_path):
43
  print(result)
44
  result = result.replace(' ', ', ')
45
  print(result)
46
- """
47
  result = json.loads(result)
48
  print(result)
49
- """
50
 
51
- return [img_path, result]
52
 
53
  examples = [
54
  ["./AAMED/python/002_0038.jpg"]
@@ -58,7 +56,8 @@ gr.Interface(
58
  fn=detect_ellipses,
59
  inputs=gr.Image(label="Upload image with ellipses", type="filepath"),
60
  outputs=[
61
- gr.Image(type="filepath", label="Detected ellipses")
 
62
  ],
63
  title=title,
64
  examples=examples,
 
43
  print(result)
44
  result = result.replace(' ', ', ')
45
  print(result)
 
46
  result = json.loads(result)
47
  print(result)
 
48
 
49
+ return [img_path, json.dumps(result)]
50
 
51
  examples = [
52
  ["./AAMED/python/002_0038.jpg"]
 
56
  fn=detect_ellipses,
57
  inputs=gr.Image(label="Upload image with ellipses", type="filepath"),
58
  outputs=[
59
+ gr.Image(type="filepath", label="Detected ellipses"),
60
+ gr.Textbox(label="Detected ellipses")
61
  ],
62
  title=title,
63
  examples=examples,