joheras commited on
Commit
986a0b1
·
1 Parent(s): 68e280e
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -380,7 +380,7 @@ def classify_image(image):
380
  clip_above_percentile=99,
381
  clip_below_percentile=0,
382
  )
383
- return {labels[i]: float(prediction[i]) for i in range(100)}
384
 
385
  image = gr.inputs.Image(shape=(299,299))
386
  label = gr.outputs.Image()
@@ -391,8 +391,8 @@ iface = gr.Interface(classify_image,image,label,
391
  # gr.outputs.Textbox(label="Engine issue score")],
392
  examples=["elephant.jpg"],
393
  title="Model interpretability with Integrated Gradients",
394
- description = "Model interpretability with Integrated Gradients from <a href=\"https://keras.io/examples/vision/integrated_gradients/\">keras examples</a>.",
395
- article = "Author: <a href=\"https://huggingface.co/joheras\">Jónathan Heras</a>"
396
  # examples = ["sample.csv"],
397
  )
398
 
 
380
  clip_above_percentile=99,
381
  clip_below_percentile=0,
382
  )
383
+ return img_grads
384
 
385
  image = gr.inputs.Image(shape=(299,299))
386
  label = gr.outputs.Image()
 
391
  # gr.outputs.Textbox(label="Engine issue score")],
392
  examples=["elephant.jpg"],
393
  title="Model interpretability with Integrated Gradients",
394
+ description = "Model interpretability with Integrated Gradients.",
395
+ article = "Author: <a href=\"https://huggingface.co/joheras\">Jónathan Heras</a>. Based on the keras example from <a href=\"https://keras.io/examples/vision/integrated_gradients/\">A_K_Nain</a>"
396
  # examples = ["sample.csv"],
397
  )
398