Spaces:
Sleeping
Sleeping
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(): | |
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) | |