imCuteCat commited on
Commit
c2982d3
1 Parent(s): 8e25aba

Update predict.py

Browse files
Files changed (1) hide show
  1. predict.py +1 -26
predict.py CHANGED
@@ -57,29 +57,4 @@ def gradio_predict(audio, bg_color, fg_alpha, bars_color, bar_count, bar_width,
57
  predictor = Predictor()
58
  result = predictor.predict(
59
  audio=audio,
60
- bg_color=bg_color,
61
- fg_alpha=fg_alpha,
62
- bars_color=bars_color,
63
- bar_count=bar_count,
64
- bar_width=bar_width,
65
- caption_text=caption_text
66
- )
67
- return result
68
-
69
- # Launch Gradio interface
70
- interface = gr.Interface(
71
- fn=gradio_predict,
72
- inputs=[
73
- gr.Audio(source="upload", type="filepath", label="Audio File"),
74
- gr.Textbox(value="#000000", label="Background Color"),
75
- gr.Slider(0, 1, value=0.75, label="Foreground Opacity"),
76
- gr.ColorPicker(value="#ffffff", label="Bars Color"),
77
- gr.Slider(10, 500, value=100, step=1, label="Number of Bars"),
78
- gr.Slider(0, 1, value=0.4, step=0.1, label="Bar Width"),
79
- gr.Textbox(default="", label="Caption Text")
80
- ],
81
- outputs=gr.Video(label="Waveform Video"),
82
- live=False
83
- )
84
-
85
- interface.launch(server_name="0.0.0.0", server_port=7860)
 
57
  predictor = Predictor()
58
  result = predictor.predict(
59
  audio=audio,
60
+ bg_color=bg