jhj0517 commited on
Commit
098522f
·
1 Parent(s): cfcce3d

Move to common parameter

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -88,6 +88,9 @@ class App:
88
  nb_compression_ratio_threshold = gr.Number(label="Compression Ratio Threshold", value=whisper_params["compression_ratio_threshold"],
89
  interactive=True,
90
  info="If the gzip compression ratio is above this value, treat as failed.")
 
 
 
91
  with gr.Group(visible=isinstance(self.whisper_inf, FasterWhisperInference)):
92
  nb_length_penalty = gr.Number(label="Length Penalty", value=whisper_params["length_penalty"],
93
  info="Exponential length penalty constant.")
@@ -113,9 +116,6 @@ class App:
113
  nb_max_new_tokens = gr.Number(label="Max New Tokens", value=lambda: whisper_params["max_new_tokens"],
114
  precision=0,
115
  info="Maximum number of new tokens to generate per-chunk. If not set, the maximum will be set by the default max_length.")
116
- nb_chunk_length = gr.Number(label="Chunk Length (s)", value=lambda: whisper_params["chunk_length"],
117
- precision=0,
118
- info="The length of audio segments. If it is not None, it will overwrite the default chunk_length of the FeatureExtractor.")
119
  nb_hallucination_silence_threshold = gr.Number(label="Hallucination Silence Threshold (sec)",
120
  value=lambda: whisper_params["hallucination_silence_threshold"],
121
  info="When 'Word Timestamps' is True, skip silent periods longer than this threshold (in seconds) when a possible hallucination is detected.")
 
88
  nb_compression_ratio_threshold = gr.Number(label="Compression Ratio Threshold", value=whisper_params["compression_ratio_threshold"],
89
  interactive=True,
90
  info="If the gzip compression ratio is above this value, treat as failed.")
91
+ nb_chunk_length = gr.Number(label="Chunk Length (s)", value=lambda: whisper_params["chunk_length"],
92
+ precision=0,
93
+ info="The length of audio segments. If it is not None, it will overwrite the default chunk_length of the FeatureExtractor.")
94
  with gr.Group(visible=isinstance(self.whisper_inf, FasterWhisperInference)):
95
  nb_length_penalty = gr.Number(label="Length Penalty", value=whisper_params["length_penalty"],
96
  info="Exponential length penalty constant.")
 
116
  nb_max_new_tokens = gr.Number(label="Max New Tokens", value=lambda: whisper_params["max_new_tokens"],
117
  precision=0,
118
  info="Maximum number of new tokens to generate per-chunk. If not set, the maximum will be set by the default max_length.")
 
 
 
119
  nb_hallucination_silence_threshold = gr.Number(label="Hallucination Silence Threshold (sec)",
120
  value=lambda: whisper_params["hallucination_silence_threshold"],
121
  info="When 'Word Timestamps' is True, skip silent periods longer than this threshold (in seconds) when a possible hallucination is detected.")