shyamgupta196 commited on
Commit
2291959
1 Parent(s): 4dbe981
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -10,9 +10,7 @@ def seg(image):
10
  inputs = feature_extractor(images=image, return_tensors="pt")
11
  outputs = model(**inputs)
12
  logits = outputs.logits
13
- predicted_class_idx = logits.argmax(-1).item()
14
- return model.config.id2label[predicted_class_idx]
15
-
16
 
17
  iface = gr.Interface(fn=seg, inputs=gr.inputs.Image(type='pil'), outputs='label')
18
  iface.launch()
 
10
  inputs = feature_extractor(images=image, return_tensors="pt")
11
  outputs = model(**inputs)
12
  logits = outputs.logits
13
+ return logits
 
 
14
 
15
  iface = gr.Interface(fn=seg, inputs=gr.inputs.Image(type='pil'), outputs='label')
16
  iface.launch()