Spaces:
Sleeping
Sleeping
File size: 1,412 Bytes
42fa7ec 14e27af efdf1b4 14e27af 42fa7ec 14e27af f8dbcd9 14e27af 761b08f 14e27af 42fa7ec 14e27af |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
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()
with gr.Row():
image_button = gr.Button("Predict NAPSI")
outputs = []
with gr.Row():
outputs.append(gr.Number(label="DeepNAPSI Sum"))
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)
|