wito / app.py
salbalat's picture
Create app.py
caa894a verified
raw
history blame contribute delete
531 Bytes
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()