Spaces:
Runtime error
Runtime error
Commit
·
0cdd4d6
1
Parent(s):
e9321a8
Add: log for frequency
Browse files- app.py +1 -1
- read_data.py +1 -0
app.py
CHANGED
@@ -9,5 +9,5 @@ def predict(file):
|
|
9 |
print("=====================================")
|
10 |
return {ans[0] :ans[1]}
|
11 |
|
12 |
-
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"]])
|
13 |
iface.launch()
|
|
|
9 |
print("=====================================")
|
10 |
return {ans[0] :ans[1]}
|
11 |
|
12 |
+
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"]], share=True)
|
13 |
iface.launch()
|
read_data.py
CHANGED
@@ -41,6 +41,7 @@ def prepare_all_leads(path, butter_filter=False):
|
|
41 |
z = pywt.wavedec(sig[2], 'db6', level=2)[0]
|
42 |
return x[None, :], y[None, :], z[None, :]
|
43 |
freq = signal.shape[1] // 60
|
|
|
44 |
if freq < 250:
|
45 |
lvl = 1
|
46 |
else:
|
|
|
41 |
z = pywt.wavedec(sig[2], 'db6', level=2)[0]
|
42 |
return x[None, :], y[None, :], z[None, :]
|
43 |
freq = signal.shape[1] // 60
|
44 |
+
print(freq)
|
45 |
if freq < 250:
|
46 |
lvl = 1
|
47 |
else:
|