nakas commited on
Commit
1a47cbd
1 Parent(s): c1497ad

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -8,7 +8,7 @@ def scale_minmax(X, min=0.0, max=1.0):
8
  X_std = (X - X.min()) / (X.max() - X.min())
9
  X_scaled = X_std * (max - min) + min
10
  return X_scaled
11
- def greet(sampleR,name):
12
  print("np array" , name)
13
  #step 0 revert the things done to get back to the raw spectrogram
14
  # i
@@ -25,7 +25,7 @@ def greet(sampleR,name):
25
  return (sampleR,S_inv)
26
  #mel -> audio
27
 
28
- iface = gr.Interface(fn=greet, inputs=gr.Image(label="Mel spectrogram", image_mode="L"),gr.Number(value=16000), outputs=gr.Audio(label="Audio"))
29
  iface.launch()
30
 
31
  #Read melpectogram of npy file
 
8
  X_std = (X - X.min()) / (X.max() - X.min())
9
  X_scaled = X_std * (max - min) + min
10
  return X_scaled
11
+ def greet(name):
12
  print("np array" , name)
13
  #step 0 revert the things done to get back to the raw spectrogram
14
  # i
 
25
  return (sampleR,S_inv)
26
  #mel -> audio
27
 
28
+ iface = gr.Interface(fn=greet, inputs=gr.Image(label="Mel spectrogram", image_mode="L"), outputs=gr.Audio(label="Audio"))
29
  iface.launch()
30
 
31
  #Read melpectogram of npy file