Commit
·
d8f634f
1
Parent(s):
c5d63c6
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,15 +7,24 @@ import gradio as gr
|
|
| 7 |
from channel_functions import individual_channel_image, channel_distribution_plotter, which_channel_dominates
|
| 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 |
inputs = gr.Image(),
|
| 12 |
outputs = "image",
|
| 13 |
title="Channel domination",
|
| 14 |
description=description1,
|
| 15 |
)
|
| 16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
|
| 19 |
-
combinedInterface = gr.TabbedInterface([iface1],['Channel domination'])
|
| 20 |
combinedInterface.launch()
|
| 21 |
|
|
|
|
| 7 |
from channel_functions import individual_channel_image, channel_distribution_plotter, which_channel_dominates
|
| 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,
|
| 17 |
)
|
| 18 |
|
| 19 |
+
iface2 = gr.Interface(
|
| 20 |
+
fn = channel_distribution_plotter,
|
| 21 |
+
inputs = gr.Image(),
|
| 22 |
+
outputs = "image",
|
| 23 |
+
title = "Distribution of pixel counts in all channels",
|
| 24 |
+
description2 = 'Something random'
|
| 25 |
+
)
|
| 26 |
|
| 27 |
|
| 28 |
+
combinedInterface = gr.TabbedInterface([iface1, iface2],['Channel domination', 'Channel distribution'])
|
| 29 |
combinedInterface.launch()
|
| 30 |
|