File size: 389 Bytes
ff522d1
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
import numpy as np
from make_predictions import make_prediction
import gradio as gr

def predict(file):
    # print(file.name)
    ans = make_prediction(file.name)
    return {ans[0] :ans[1]}

iface = gr.Interface(predict, "file", "label", title="ECG Classification", description="Upload an ECG file to classify it as Normal or Abnormal", examples=[["data/faizan_r8.txt"]])
iface.launch()