linoyts HF staff commited on
Commit
19a7ce5
1 Parent(s): e7fdc7d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -17
app.py CHANGED
@@ -71,15 +71,6 @@ def sample(ldm_stable, zs, wts, steps, prompt_tar, tstart, cfg_scale_tar): # ,
71
  return f.name
72
 
73
 
74
- # def change_tstart_range(t_start, steps):
75
- # maximum = int(0.8 * steps)
76
- # minimum = int(0.15 * steps)
77
- # if t_start > maximum:
78
- # t_start = maximum
79
- # elif t_start < minimum:
80
- # t_start = minimum
81
- # return t_start
82
-
83
 
84
  def edit(input_audio,
85
  model_id: str,
@@ -93,13 +84,6 @@ def edit(input_audio,
93
  t_start=45,
94
  randomize_seed=True):
95
 
96
- # global ldm_stable, current_loaded_model
97
- # print(f'current loaded model: {ldm_stable.model_id}')
98
- # if model_id != current_loaded_model:
99
- # print(f'Changing model to {model_id}...')
100
- # current_loaded_model = model_id
101
- # ldm_stable = None
102
- # ldm_stable = load_model(model_id, device)
103
  print(model_id)
104
  if model_id == LDM2:
105
  ldm_stable = ldm2
@@ -219,7 +203,7 @@ with gr.Blocks(css='style.css') as demo:
219
  do_inversion = gr.State(value=True) # To save some runtime when editing the same thing over and over
220
 
221
  with gr.Row():
222
- input_audio = gr.Audio(sources=["upload", "microphone"], max_length=15, type="filepath", label="Input Audio",
223
  interactive=True, scale=1)
224
  output_audio = gr.Audio(label="Edited Audio", interactive=False, scale=1)
225
 
 
71
  return f.name
72
 
73
 
 
 
 
 
 
 
 
 
 
74
 
75
  def edit(input_audio,
76
  model_id: str,
 
84
  t_start=45,
85
  randomize_seed=True):
86
 
 
 
 
 
 
 
 
87
  print(model_id)
88
  if model_id == LDM2:
89
  ldm_stable = ldm2
 
203
  do_inversion = gr.State(value=True) # To save some runtime when editing the same thing over and over
204
 
205
  with gr.Row():
206
+ input_audio = gr.Audio(sources=["upload", "microphone"], type="filepath", label="Input Audio",
207
  interactive=True, scale=1)
208
  output_audio = gr.Audio(label="Edited Audio", interactive=False, scale=1)
209