amirgame197 commited on
Commit
db092bf
1 Parent(s): 310461d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -9,10 +9,10 @@ from transparent_background import Remover
9
 
10
  @spaces.GPU
11
  def doo(video, mode):
12
- if(mode == 'Normal'):
13
- remover = Remover()
14
- if(mode == 'Fast'):
15
- remover = Remover(mode='fast')
16
  cap = cv2.VideoCapture(video)
17
  fps = cap.get(cv2.CAP_PROP_FPS)
18
 
@@ -48,5 +48,5 @@ def doo(video, mode):
48
  writer.release()
49
  return 'output.mp4'
50
 
51
- iface = gr.Interface(fn=doo, [gr.inputs.Video(type='filepath'), gr.inputs.Radio(['Normal','Fast'], type="value", default='Fast', label='Select mode')], outputs="video")
52
  iface.launch()
 
9
 
10
  @spaces.GPU
11
  def doo(video, mode):
12
+ #if(mode == 'Normal'):
13
+ # remover = Remover()
14
+ #if(mode == 'Fast'):
15
+ remover = Remover(mode='fast')
16
  cap = cv2.VideoCapture(video)
17
  fps = cap.get(cv2.CAP_PROP_FPS)
18
 
 
48
  writer.release()
49
  return 'output.mp4'
50
 
51
+ iface = gr.Interface(fn=doo, inputs="video", outputs="video")
52
  iface.launch()