Kangarroar commited on
Commit
3c4873d
1 Parent(s): fff61c8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -68,7 +68,7 @@ ckpt = st.file_uploader("Choose your CKPT", type= 'ckpt')
68
  if ckpt is not None:
69
  #TEMP FUNCTION
70
  ckpt_temp_file = os.path.join(temp_dir.name, "ckpt_temp_file.ckpt")
71
- with tempfile.NamedTemporaryFile(mode="wb", suffix='.ckpt', delete=False, dir=temp_dir) as temp:
72
  bytes_data = ckpt.getvalue()
73
  temp.write(bytes_data)
74
  st.success("File saved to: {}".format(ckpt_temp_file))
@@ -87,7 +87,7 @@ config = st.file_uploader("Choose your config", type= 'yaml')
87
  # Check if user uploaded a config file
88
  if config is not None:
89
  #TEMP FUNCTION
90
- with tempfile.NamedTemporaryFile(mode="wb", suffix='.yaml', delete=False, dir=temp_dir) as temp:
91
  # Get the file contents as bytes
92
  bytes_data = config.getvalue()
93
  # Write the bytes to the temporary file
@@ -105,7 +105,7 @@ audio = st.file_uploader("Choose your audio", type=["wav", "mp3"])
105
  # Check if user uploaded an audio file
106
  if audio is not None:
107
  #TEMP FUNCTION
108
- with tempfile.NamedTemporaryFile(mode="wb", suffix='.wav', delete=False, dir=temp_dir) as temp:
109
  # Get the file contents as bytes
110
  bytes_data = audio.getvalue()
111
  # Write the bytes to the temporary file
 
68
  if ckpt is not None:
69
  #TEMP FUNCTION
70
  ckpt_temp_file = os.path.join(temp_dir.name, "ckpt_temp_file.ckpt")
71
+ with tempfile.NamedTemporaryFile(mode="wb", suffix='.ckpt', delete=False) as temp:
72
  bytes_data = ckpt.getvalue()
73
  temp.write(bytes_data)
74
  st.success("File saved to: {}".format(ckpt_temp_file))
 
87
  # Check if user uploaded a config file
88
  if config is not None:
89
  #TEMP FUNCTION
90
+ with tempfile.NamedTemporaryFile(mode="wb", suffix='.yaml', delete=False) as temp:
91
  # Get the file contents as bytes
92
  bytes_data = config.getvalue()
93
  # Write the bytes to the temporary file
 
105
  # Check if user uploaded an audio file
106
  if audio is not None:
107
  #TEMP FUNCTION
108
+ with tempfile.NamedTemporaryFile(mode="wb", suffix='.wav', delete=False) as temp:
109
  # Get the file contents as bytes
110
  bytes_data = audio.getvalue()
111
  # Write the bytes to the temporary file