Update app.py
Browse files
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
|
| 15 |
-
|
| 16 |
|
| 17 |
-
|
| 18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
| 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)
|