Spaces:
Runtime error
Runtime error
fix: exmaple directiory path and convert tensor to numpy
Browse files
app.py
CHANGED
|
@@ -22,9 +22,9 @@ def infer(test_image):
|
|
| 22 |
inv3_kernel = tf.reduce_sum(inv3_kernel, axis=[-1, -2, -3])
|
| 23 |
|
| 24 |
return (
|
| 25 |
-
inv1_kernel[0, ..., None],
|
| 26 |
-
inv2_kernel[0, ..., None],
|
| 27 |
-
inv3_kernel[0, ..., None]
|
| 28 |
)
|
| 29 |
|
| 30 |
iface = gr.Interface(
|
|
@@ -40,5 +40,5 @@ iface = gr.Interface(
|
|
| 40 |
gr.outputs.Image(label="Activation from Kernel 2"),
|
| 41 |
gr.outputs.Image(label="Activation from Kernel 3"),
|
| 42 |
],
|
| 43 |
-
examples=[["examples/llama.jpeg"], ["examples/dalai-lamao.jpeg"]],
|
| 44 |
).launch()
|
|
|
|
| 22 |
inv3_kernel = tf.reduce_sum(inv3_kernel, axis=[-1, -2, -3])
|
| 23 |
|
| 24 |
return (
|
| 25 |
+
inv1_kernel[0, ..., None].numpy(),
|
| 26 |
+
inv2_kernel[0, ..., None].numpy(),
|
| 27 |
+
inv3_kernel[0, ..., None].numpy(),
|
| 28 |
)
|
| 29 |
|
| 30 |
iface = gr.Interface(
|
|
|
|
| 40 |
gr.outputs.Image(label="Activation from Kernel 2"),
|
| 41 |
gr.outputs.Image(label="Activation from Kernel 3"),
|
| 42 |
],
|
| 43 |
+
examples=[["./examples/llama.jpeg"], ["./examples/dalai-lamao.jpeg"]],
|
| 44 |
).launch()
|