Spaces:
Sleeping
Sleeping
Commit ·
420d7ba
1
Parent(s): 5a50849
erreur de merde
Browse files- CnnClassification.py +1 -1
- api.py +1 -1
CnnClassification.py
CHANGED
|
@@ -36,7 +36,7 @@ with open("models/genre_mapping.json", 'r') as f:
|
|
| 36 |
|
| 37 |
def load_image(img_path):
|
| 38 |
"""img = image.load_img(img_path, target_size=(224, 224))"""
|
| 39 |
-
img = image.load_img(img_path, target_size=(
|
| 40 |
img_array = image.img_to_array(img)
|
| 41 |
img_array = np.expand_dims(img_array, axis=0)
|
| 42 |
img_array = img_array / 255.
|
|
|
|
| 36 |
|
| 37 |
def load_image(img_path):
|
| 38 |
"""img = image.load_img(img_path, target_size=(224, 224))"""
|
| 39 |
+
img = image.load_img(img_path, target_size=(224, 224)) #crnn
|
| 40 |
img_array = image.img_to_array(img)
|
| 41 |
img_array = np.expand_dims(img_array, axis=0)
|
| 42 |
img_array = img_array / 255.
|
api.py
CHANGED
|
@@ -33,7 +33,7 @@ def predict():
|
|
| 33 |
#crnn
|
| 34 |
spectro_path = os.path.join("images", f"spec_{uuid.uuid4().hex}.png")
|
| 35 |
audio_to_mel_spec(filepath, spectro_path)
|
| 36 |
-
img = image.load_img(spectro_path, target_size=(
|
| 37 |
img_array = image.img_to_array(img)
|
| 38 |
img_array = np.expand_dims(img_array, axis=0)
|
| 39 |
|
|
|
|
| 33 |
#crnn
|
| 34 |
spectro_path = os.path.join("images", f"spec_{uuid.uuid4().hex}.png")
|
| 35 |
audio_to_mel_spec(filepath, spectro_path)
|
| 36 |
+
img = image.load_img(spectro_path, target_size=(224, 224))
|
| 37 |
img_array = image.img_to_array(img)
|
| 38 |
img_array = np.expand_dims(img_array, axis=0)
|
| 39 |
|