Spaces:
Runtime error
Runtime error
File size: 1,158 Bytes
0e2bf0e 3eb1f6c 0e2bf0e e468ceb 0e2bf0e 58a2738 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
from libs import *
from predicts import procesar_archivo
import gradio as gr
with gr.Blocks() as interface:
gr.Image(value='./ComplutenseTFGBanner.png',show_label=False)
with gr.Column():
format = gr.inputs.Dropdown(["XMLsierra","CSV"],default="XMLsierra",label= "Formato del archivo")
with gr.Row():
number = gr.inputs.Slider(label="Valor",default=200,minimum=1,maximum=999)
unit = gr.inputs.Dropdown(["V","miliV","microV","nanoV"], label="Unidad",default="miliV")
with gr.Column():
frec = gr.inputs.Number(label= "Frecuencia (Hz)",default=500)
file = gr.inputs.File(label="Selecciona un archivo.")
button = gr.Button(value='Analizar')
out = gr.DataFrame(label="Diagnostico automático.",type="pandas",headers = ['Red','Posibles predicciones'],value=[['Antonior92','1aAVb, RBBB, LBBB, SB, AF, ST'],['CPSC-2018','Normal, AF, IAVB, LBBB, RBBB, PAC, PVC, STD, STE'],['Chapman', 'AFIB, GSVT, SB, SR']])
img = gr.outputs.Image(label="Imagen",type='filepath')
button.click(fn=procesar_archivo,inputs=[format,number,unit,frec,file] ,outputs=[out,img])
interface.launch()
|