fabiogra commited on
Commit
644834b
1 Parent(s): 5472963

fix: replace st_local_audio to fix mobile issues

Browse files
Files changed (1) hide show
  1. app/pages/Separate.py +4 -3
app/pages/Separate.py CHANGED
@@ -139,8 +139,9 @@ def body():
139
  index=len(samples_song),
140
  key="select_example",
141
  )
142
- if name_song != "" and (Path("/tmp") / name_song).exists():
143
- st_local_audio(Path("/tmp") / name_song, key=f"input_from_sample_{name_song}")
 
144
  else:
145
  name_song = None
146
 
@@ -183,7 +184,7 @@ def body():
183
  os.remove(in_path / filename)
184
  filename = None
185
  return
186
- st_local_audio(in_path / filename, key="input_from_url")
187
  else:
188
  st.error(
189
  "Failed to download audio file. Try to download it manually and upload it."
 
139
  index=len(samples_song),
140
  key="select_example",
141
  )
142
+ full_path = f"{in_path}/{name_song}"
143
+ if name_song != "" and (full_path).exists():
144
+ st.audio(full_path)
145
  else:
146
  name_song = None
147
 
 
184
  os.remove(in_path / filename)
185
  filename = None
186
  return
187
+ st.audio(f"{in_path}/{filename}")
188
  else:
189
  st.error(
190
  "Failed to download audio file. Try to download it manually and upload it."