Harshitaraina commited on
Commit
8268a21
·
verified ·
1 Parent(s): 7fecbe5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -1,4 +1,3 @@
1
-
2
  import gradio as gr
3
 
4
  import torch
@@ -51,6 +50,8 @@ def identity(video_path):
51
  num_chunks = len_audio // max_min
52
  else:
53
  num_chunks = len_audio // max_min + 1
 
 
54
  print(f"Total length of audio = {len_audio} chunks = {num_chunks}")
55
  estimate = []
56
  split_tensors = torch.tensor_split(sample, int(num_chunks), dim = 1)
@@ -81,9 +82,9 @@ demo = gr.Interface(
81
  fn=identity,
82
  title="AudioPure - THE BEST AUDIO DENOISER",
83
  description="AudioPure is the only platform you need for removing all kinds of background noise from your videos!!",
84
- # examples=[['audiopure_og.mov']],
85
- # cache_examples=True,
86
  inputs=gr.Video(label="Input Video", sources="upload"),
87
  outputs=gr.Video(label="Output Video"),
88
- )
89
- demo.launch(share=True, debug=True)
 
 
1
  import gradio as gr
2
 
3
  import torch
 
50
  num_chunks = len_audio // max_min
51
  else:
52
  num_chunks = len_audio // max_min + 1
53
+ if len_audio and not num_chunks:
54
+ num_chunks += 1
55
  print(f"Total length of audio = {len_audio} chunks = {num_chunks}")
56
  estimate = []
57
  split_tensors = torch.tensor_split(sample, int(num_chunks), dim = 1)
 
82
  fn=identity,
83
  title="AudioPure - THE BEST AUDIO DENOISER",
84
  description="AudioPure is the only platform you need for removing all kinds of background noise from your videos!!",
85
+ examples=[['audiopure_og.mov']],
86
+ cache_examples=True,
87
  inputs=gr.Video(label="Input Video", sources="upload"),
88
  outputs=gr.Video(label="Output Video"),
89
+ )
90
+ demo.launch()