Spaces:
Runtime error
Runtime error
shyamgupta196
commited on
Commit
•
2291959
1
Parent(s):
4dbe981
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 |
-
|
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()
|