File size: 531 Bytes
caa894a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
import gradio as gr
import numpy as np
def predict_glucose(bioimpedance_value):
# Modelo simple simulado: fórmula inventada para demo
glucose = 0.75 * bioimpedance_value + 20
return round(glucose, 2)
demo = gr.Interface(
fn=predict_glucose,
inputs=gr.Slider(minimum=200, maximum=1500, label="Bioimpedance (Ohms)"),
outputs=gr.Number(label="Estimated Glucose (mg/dL)"),
title="WITO - Glucose Estimator",
description="Enter a bioimpedance value and get a predicted glucose level."
)
demo.launch()
|