gnosticdev commited on
Commit
7377045
verified
1 Parent(s): 5ef121d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -6,7 +6,7 @@ import matplotlib.pyplot as plt
6
  from PIL import Image
7
  import tempfile
8
  import os
9
- import io # Importar el m贸dulo 'io'
10
 
11
  def generate_waveform_video(audio_file, image_file):
12
  try:
@@ -45,7 +45,7 @@ def generate_waveform_video(audio_file, image_file):
45
 
46
  # Convertir figura a numpy array usando io.BytesIO
47
  buf = io.BytesIO()
48
- plt.savefig(buf, format='png', bbox_inches='tight', pad_inches=0)
49
  plt.close(fig)
50
  return np.array(Image.open(buf))
51
 
 
6
  from PIL import Image
7
  import tempfile
8
  import os
9
+ import io
10
 
11
  def generate_waveform_video(audio_file, image_file):
12
  try:
 
45
 
46
  # Convertir figura a numpy array usando io.BytesIO
47
  buf = io.BytesIO()
48
+ plt.savefig(buf, format='png', bbox_inches='tight', pad_inches=0, transparent=False)
49
  plt.close(fig)
50
  return np.array(Image.open(buf))
51