miwojc commited on
Commit
8f0afa6
·
1 Parent(s): 8c82692

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -6,7 +6,6 @@ def label_func(fn): return path/'masks1b-binary'/f'{fn.stem}.png'
6
 
7
  repo_id = "hugginglearners/kvasir-seg"
8
  learn = from_pretrained_fastai(repo_id)
9
- #labels = learn.dls.vocab
10
 
11
  def predict(img):
12
  img = PILImage.create(img)
@@ -16,7 +15,6 @@ def predict(img):
16
  interface_options = {
17
  "title": "kvasir-seg fastai segmentation",
18
  "description": "tbd",
19
- "interpretation": "default",
20
  "layout": "horizontal",
21
  "examples": [
22
  "cju5eftctcdbj08712gdp989f.jpg",
@@ -28,8 +26,8 @@ interface_options = {
28
 
29
  demo = gr.Interface(
30
  fn=predict,
31
- inputs=gr.inputs.Image(shape=(224, 224)),
32
- outputs=gr.inputs.Image(shape=(224, 224)),
33
  **interface_options,
34
  )
35
 
 
6
 
7
  repo_id = "hugginglearners/kvasir-seg"
8
  learn = from_pretrained_fastai(repo_id)
 
9
 
10
  def predict(img):
11
  img = PILImage.create(img)
 
15
  interface_options = {
16
  "title": "kvasir-seg fastai segmentation",
17
  "description": "tbd",
 
18
  "layout": "horizontal",
19
  "examples": [
20
  "cju5eftctcdbj08712gdp989f.jpg",
 
26
 
27
  demo = gr.Interface(
28
  fn=predict,
29
+ inputs=gr.Image(shape=(224, 224)),
30
+ outputs=gr.Image(shape=(224, 224)),
31
  **interface_options,
32
  )
33