Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ def waveform_to_sound(image, speed):
|
|
9 |
img_data = np.array(img)
|
10 |
|
11 |
# Thresholding: only keep white pixels
|
12 |
-
threshold =
|
13 |
img_data = np.where(img_data > threshold, img_data, 0)
|
14 |
|
15 |
# Normalize the remaining data
|
|
|
9 |
img_data = np.array(img)
|
10 |
|
11 |
# Thresholding: only keep white pixels
|
12 |
+
threshold = 1 # You can adjust this value as needed
|
13 |
img_data = np.where(img_data > threshold, img_data, 0)
|
14 |
|
15 |
# Normalize the remaining data
|