data
Browse files
app.py
CHANGED
@@ -112,7 +112,7 @@ def thresh_fn(val):
|
|
112 |
|
113 |
rgba_img = cmap(preds)
|
114 |
rgb_img = np.delete(rgba_img, 3, 2)
|
115 |
-
return rgb_img
|
116 |
|
117 |
with gr.Blocks() as demo:
|
118 |
gr.Markdown(
|
@@ -123,7 +123,6 @@ with gr.Blocks() as demo:
|
|
123 |
with gr.Row():
|
124 |
inp = gr.Dropdown(label="Taxonomic Hierarchy", choices=["Class", "Order", "Family", "Genus", "Species"])
|
125 |
out = gr.Dropdown(label="Name", interactive=True)
|
126 |
-
text = gr.Textbox(label="Natural Language Description")
|
127 |
inp.change(update_fn, inp, out)
|
128 |
|
129 |
with gr.Row():
|
@@ -136,6 +135,6 @@ with gr.Blocks() as demo:
|
|
136 |
pred = gr.Image(label="Predicted Heatmap", visible=True)
|
137 |
|
138 |
check_button.click(text_fn, inputs=[inp, out], outputs=[pred])
|
139 |
-
slider.change(thresh_fn, slider, outputs=
|
140 |
|
141 |
demo.launch()
|
|
|
112 |
|
113 |
rgba_img = cmap(preds)
|
114 |
rgb_img = np.delete(rgba_img, 3, 2)
|
115 |
+
return rgb_img
|
116 |
|
117 |
with gr.Blocks() as demo:
|
118 |
gr.Markdown(
|
|
|
123 |
with gr.Row():
|
124 |
inp = gr.Dropdown(label="Taxonomic Hierarchy", choices=["Class", "Order", "Family", "Genus", "Species"])
|
125 |
out = gr.Dropdown(label="Name", interactive=True)
|
|
|
126 |
inp.change(update_fn, inp, out)
|
127 |
|
128 |
with gr.Row():
|
|
|
135 |
pred = gr.Image(label="Predicted Heatmap", visible=True)
|
136 |
|
137 |
check_button.click(text_fn, inputs=[inp, out], outputs=[pred])
|
138 |
+
slider.change(thresh_fn, slider, outputs=pred)
|
139 |
|
140 |
demo.launch()
|