AbdullaShafeeg commited on
Commit
8176b6f
·
1 Parent(s): 9ca3c5c

big update

Browse files
Files changed (1) hide show
  1. app.py +10 -8
app.py CHANGED
@@ -46,6 +46,16 @@ if uploaded_file is not None:
46
  time.sleep(2)
47
  st.write("File Saved!")
48
 
 
 
 
 
 
 
 
 
 
 
49
  while(endReached==False):
50
  sr, waveform = wavfile.read(uploaded_file.name)
51
  input_tensor = torch.tensor(waveform[s:n]).unsqueeze(0).to(torch.float32)
@@ -58,14 +68,6 @@ if uploaded_file is not None:
58
  n += 16000
59
  if(n >= len(waveform)):
60
  endReached = True
61
-
62
- # PERCENTAGE OF SNORING PLOT
63
-
64
- filename = uploaded_file.name
65
- cwdir = os.getcwd()
66
- file_path = os.path.join(cwdir, filename)
67
-
68
- if st.button("Analyse"):
69
  total = snore + other
70
  snore_percentage = (snore / total) * 100
71
  other_percentage = (other / total) * 100
 
46
  time.sleep(2)
47
  st.write("File Saved!")
48
 
49
+
50
+
51
+ # PERCENTAGE OF SNORING PLOT
52
+
53
+
54
+
55
+ if st.button("Analyse"):
56
+ filename = uploaded_file.name
57
+ cwdir = os.getcwd()
58
+ file_path = os.path.join(cwdir, filename)
59
  while(endReached==False):
60
  sr, waveform = wavfile.read(uploaded_file.name)
61
  input_tensor = torch.tensor(waveform[s:n]).unsqueeze(0).to(torch.float32)
 
68
  n += 16000
69
  if(n >= len(waveform)):
70
  endReached = True
 
 
 
 
 
 
 
 
71
  total = snore + other
72
  snore_percentage = (snore / total) * 100
73
  other_percentage = (other / total) * 100