AlekseyKorshuk commited on
Commit
34d89e8
1 Parent(s): 6913c85

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -76,7 +76,7 @@ num_epoch = st.number_input("Number of epochs:",
76
  min_value=1,
77
  max_value=1000,
78
  step=1,
79
- value=10,
80
  )
81
 
82
  tonic_name = st.selectbox(
@@ -90,9 +90,14 @@ if generate_image_button:
90
  input_file = f"./examples/{model_name}"
91
  if uploaded_file is not None:
92
  input_file = uploaded_file.name
 
 
 
93
  with st.spinner(text=f"Generating, this may take some time..."):
94
  before, after = inference(input_file, num_epoch, tonic_name)
95
  st.markdown("Before:")
96
  st.audio(before)
97
  st.markdown("After:")
98
  st.audio(after)
 
 
 
76
  min_value=1,
77
  max_value=1000,
78
  step=1,
79
+ value=1,
80
  )
81
 
82
  tonic_name = st.selectbox(
 
90
  input_file = f"./examples/{model_name}"
91
  if uploaded_file is not None:
92
  input_file = uploaded_file.name
93
+ with open(input_file, 'wb') as f:
94
+ f.write(uploaded_file.getvalue())
95
+ # print(uploaded_file.getvalue())
96
  with st.spinner(text=f"Generating, this may take some time..."):
97
  before, after = inference(input_file, num_epoch, tonic_name)
98
  st.markdown("Before:")
99
  st.audio(before)
100
  st.markdown("After:")
101
  st.audio(after)
102
+ if uploaded_file is not None:
103
+ os.remove(input_file)