Commit
·
3c3a6af
1
Parent(s):
9347ebd
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,9 +8,13 @@ from channel_functions import individual_channel_image, channel_distribution_plo
|
|
| 8 |
description1 = '''This tab shows which channel dominates which part of an image\n
|
| 9 |
Upload an image or drag an online image to the upload section. Bring it to the rectangular area. Release it when the border becomes red'''
|
| 10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
iface1 = gr.Interface(
|
| 12 |
fn = which_channel_dominates,
|
| 13 |
-
inputs = gr.Image(),
|
| 14 |
outputs = "image",
|
| 15 |
title="Channel domination",
|
| 16 |
description=description1,
|
|
|
|
| 8 |
description1 = '''This tab shows which channel dominates which part of an image\n
|
| 9 |
Upload an image or drag an online image to the upload section. Bring it to the rectangular area. Release it when the border becomes red'''
|
| 10 |
|
| 11 |
+
original_image_plot = gr.inputs.Radio(['yes','no'], label = "Do you want the original image be plotted in the background?")
|
| 12 |
+
original_image_opacity = gr.slider(0,1, value = 0.3, label = "Opacity of the original image")
|
| 13 |
+
channel_opacity = gr.slider(0,1, value = 0.7, label = "Opacity of the output channel-domination image")
|
| 14 |
+
|
| 15 |
iface1 = gr.Interface(
|
| 16 |
fn = which_channel_dominates,
|
| 17 |
+
inputs = [gr.Image(), original_image_plot, original_image_opacity, channel_opacity],
|
| 18 |
outputs = "image",
|
| 19 |
title="Channel domination",
|
| 20 |
description=description1,
|