sfmig commited on
Commit
9267ec1
1 Parent(s): f9e4a95

missed import torch

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -9,6 +9,8 @@ from transformers import DetrFeatureExtractor, DetrForSegmentation
9
  from PIL import Image
10
  import gradio as gr
11
  import numpy as np
 
 
12
 
13
  # Returns a list with a color per ADE class (150 classes)
14
  # from https://huggingface.co/spaces/chansung/segformer-tf-transformers/blob/main/app.py
@@ -197,8 +199,8 @@ def predict_animal_mask(image):
197
  gr.Interface(predict_animal_mask,
198
  inputs = input,
199
  outputs = output,
200
- title = 'Animals segmentation in images',
201
- description = "An animal segmentation image webapp using DETR (End-to-End Object Detection) model with ResNet-50 backbone").launch()
202
 
203
 
204
  ####################################
 
9
  from PIL import Image
10
  import gradio as gr
11
  import numpy as np
12
+ import torch
13
+ import torchvision
14
 
15
  # Returns a list with a color per ADE class (150 classes)
16
  # from https://huggingface.co/spaces/chansung/segformer-tf-transformers/blob/main/app.py
 
199
  gr.Interface(predict_animal_mask,
200
  inputs = input,
201
  outputs = output,
202
+ title = 'Animals* segmentation in images',
203
+ description = "An animal* segmentation image webapp using DETR (End-to-End Object Detection) model with ResNet-50 backbone").launch()
204
 
205
 
206
  ####################################