Kangarroar commited on
Commit
cb8a52f
1 Parent(s): 077bbd5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -67,7 +67,7 @@ with tempfile.TemporaryDirectory(dir=os.path.expanduser("~/app")) as temp_dir:
67
  # Check if user uploaded a CKPT file
68
  if ckpt is not None:
69
  #TEMP FUNCTION
70
- with tempfile.NamedTemporaryFile(mode="wb", suffix='.ckpt', delete=False, dir=temp_dir) as temp:
71
  # Get the file contents as bytes
72
  bytes_data = ckpt.getvalue()
73
  # Write the bytes to the temporary file
@@ -104,7 +104,7 @@ with tempfile.TemporaryDirectory(dir=os.path.expanduser("~/app")) as temp_dir:
104
  # Check if user uploaded an audio file
105
  if audio is not None:
106
  #TEMP FUNCTION
107
- with tempfile.NamedTemporaryFile(mode="wb", suffix='.wav', delete=False, dir=temp_dir) as temp:
108
  # Get the file contents as bytes
109
  bytes_data = audio.getvalue()
110
  # Write the bytes to the temporary file
 
67
  # Check if user uploaded a CKPT file
68
  if ckpt is not None:
69
  #TEMP FUNCTION
70
+ with tempfile.NamedTemporaryFile(mode="wb", suffix='.ckpt', delete=False) as temp:
71
  # Get the file contents as bytes
72
  bytes_data = ckpt.getvalue()
73
  # Write the bytes to the temporary file
 
104
  # Check if user uploaded an audio file
105
  if audio is not None:
106
  #TEMP FUNCTION
107
+ with tempfile.NamedTemporaryFile(mode="wb", suffix='.wav', delete=False) as temp:
108
  # Get the file contents as bytes
109
  bytes_data = audio.getvalue()
110
  # Write the bytes to the temporary file