mayayank commited on
Commit
a3e1cfd
·
1 Parent(s): 38f89f3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -4
app.py CHANGED
@@ -11,8 +11,11 @@ label_map_object = {0: 'LARGE BOWEL', 1: 'SMALL BOWEL', 2: 'STOMACH', 3: 'BACKGR
11
  # Load the model
12
  model = load_model(model_path)
13
 
14
- def greet(name):
15
- return "Hello " + name + "!!"
16
 
17
- iface = gr.Interface(fn=greet, inputs="text", outputs="text")
18
- iface.launch()
 
 
 
 
11
  # Load the model
12
  model = load_model(model_path)
13
 
14
+ def segment_object(image):
15
+ plt.imshow(image)
16
 
17
+ webcam = gr.inputs.Image(shape=(800, 600), source="upload", type='file') #upload
18
+
19
+ webapp = gr.interface.Interface(fn=segment_object, inputs=webcam, outputs="plot") #, live=False
20
+
21
+ webapp.launch(debug=True)