DeepNAPSI / app.py
Folle, Lukas
Added first working version of application, NAPSI is dummy.
14e27af
raw history blame
No virus
1.32 kB
import gradio as gr
from backend import Infer
DEBUG = True
infer = Infer(DEBUG)
with gr.Blocks(analytics_enabled=False, title="DeepNAPSI Prediction") as demo:
with gr.Column():
gr.Markdown("Upload an image of the hand and click **Predict NAPSI** to see the output.")
with gr.Column():
image_input = gr.Image()
image_button = gr.Button("Predict NAPSI")
outputs = []
with gr.Row():
with gr.Column():
outputs.append(gr.Image())
outputs.append(gr.Number(label="DeepNAPSI Thumb"))
with gr.Column():
outputs.append(gr.Image())
outputs.append(gr.Number(label="DeepNAPSI Index"))
with gr.Column():
outputs.append(gr.Image())
outputs.append(gr.Number(label="DeepNAPSI Middle"))
with gr.Column():
outputs.append(gr.Image())
outputs.append(gr.Number(label="DeepNAPSI Ring"))
with gr.Column():
outputs.append(gr.Image())
outputs.append(gr.Number(label="DeepNAPSI Pinky"))
image_button.click(infer.predict, inputs=image_input, outputs=outputs)
demo.launch(share=True)