ariG23498 HF staff commited on
Commit
ce34875
β€’
1 Parent(s): 0e00876

chore: no carousel

Browse files
Files changed (1) hide show
  1. app.py +7 -9
app.py CHANGED
@@ -21,11 +21,11 @@ def infer(test_image):
21
  inv2_kernel = tf.reduce_sum(inv2_kernel, axis=[-1, -2, -3])
22
  inv3_kernel = tf.reduce_sum(inv3_kernel, axis=[-1, -2, -3])
23
 
24
- return [
25
  tf.keras.utils.array_to_img(inv1_kernel[0, ..., None]),
26
  tf.keras.utils.array_to_img(inv2_kernel[0, ..., None]),
27
  tf.keras.utils.array_to_img(inv3_kernel[0, ..., None]),
28
- ]
29
 
30
  # define the article
31
  article = """<center>
@@ -45,19 +45,17 @@ Involution Kernel
45
  description="""
46
  Visualize the activation maps from the Involution Kernel.πŸ•΅πŸ»β€β™‚οΈ
47
  """
48
-
49
- labels = [
50
- "1",
51
- "2",
52
- "3",
53
- ]
54
  iface = gr.Interface(
55
  fn=infer,
56
  title="Involutional Neural Networks",
57
  article=article,
58
  description=description,
59
  inputs=gr.inputs.Image(label="Input Image"),
60
- outputs=gr.outputs.Carousel(["image", "image", "image"], label=labels),
 
 
 
 
61
  examples=[["examples/lama.jpeg"], ["examples/dalai_lama.jpeg"]],
62
  layout="horizontal",
63
  ).launch(share=True)
 
21
  inv2_kernel = tf.reduce_sum(inv2_kernel, axis=[-1, -2, -3])
22
  inv3_kernel = tf.reduce_sum(inv3_kernel, axis=[-1, -2, -3])
23
 
24
+ return (
25
  tf.keras.utils.array_to_img(inv1_kernel[0, ..., None]),
26
  tf.keras.utils.array_to_img(inv2_kernel[0, ..., None]),
27
  tf.keras.utils.array_to_img(inv3_kernel[0, ..., None]),
28
+ )
29
 
30
  # define the article
31
  article = """<center>
 
45
  description="""
46
  Visualize the activation maps from the Involution Kernel.πŸ•΅πŸ»β€β™‚οΈ
47
  """
 
 
 
 
 
 
48
  iface = gr.Interface(
49
  fn=infer,
50
  title="Involutional Neural Networks",
51
  article=article,
52
  description=description,
53
  inputs=gr.inputs.Image(label="Input Image"),
54
+ outputs=[
55
+ gr.outputs.Image(label="Activation from Kernel 1"),
56
+ gr.outputs.Image(label="Activation from Kernel 2"),
57
+ gr.outputs.Image(label="Activation from Kernel 3"),
58
+ ],
59
  examples=[["examples/lama.jpeg"], ["examples/dalai_lama.jpeg"]],
60
  layout="horizontal",
61
  ).launch(share=True)