jhj0517 commited on
Commit
594c1ea
·
1 Parent(s): 5a66e88

refactor type to int

Browse files
Files changed (2) hide show
  1. app.py +3 -3
  2. modules/whisper/whisper_parameter.py +1 -1
app.py CHANGED
@@ -142,7 +142,7 @@ class App:
142
  info="If word_timestamps is True, merge these punctuation symbols with the previous word.")
143
  nb_max_new_tokens = gr.Number(label="Max New Tokens", value=None, precision=0,
144
  info="Maximum number of new tokens to generate per-chunk. If not set, the maximum will be set by the default max_length.")
145
- nb_chunk_length = gr.Number(label="Chunk Length", value=None,
146
  info="The length of audio segments. If it is not None, it will overwrite the default chunk_length of the FeatureExtractor.")
147
  nb_hallucination_silence_threshold = gr.Number(label="Hallucination Silence Threshold",
148
  value=None,
@@ -296,7 +296,7 @@ class App:
296
  info="If word_timestamps is True, merge these punctuation symbols with the previous word.")
297
  nb_max_new_tokens = gr.Number(label="Max New Tokens", value=None, precision=0,
298
  info="Maximum number of new tokens to generate per-chunk. If not set, the maximum will be set by the default max_length.")
299
- nb_chunk_length = gr.Number(label="Chunk Length", value=None,
300
  info="The length of audio segments. If it is not None, it will overwrite the default chunk_length of the FeatureExtractor.")
301
  nb_hallucination_silence_threshold = gr.Number(label="Hallucination Silence Threshold",
302
  value=None,
@@ -442,7 +442,7 @@ class App:
442
  info="If word_timestamps is True, merge these punctuation symbols with the previous word.")
443
  nb_max_new_tokens = gr.Number(label="Max New Tokens", value=None, precision=0,
444
  info="Maximum number of new tokens to generate per-chunk. If not set, the maximum will be set by the default max_length.")
445
- nb_chunk_length = gr.Number(label="Chunk Length", value=None,
446
  info="The length of audio segments. If it is not None, it will overwrite the default chunk_length of the FeatureExtractor.")
447
  nb_hallucination_silence_threshold = gr.Number(label="Hallucination Silence Threshold",
448
  value=None,
 
142
  info="If word_timestamps is True, merge these punctuation symbols with the previous word.")
143
  nb_max_new_tokens = gr.Number(label="Max New Tokens", value=None, precision=0,
144
  info="Maximum number of new tokens to generate per-chunk. If not set, the maximum will be set by the default max_length.")
145
+ nb_chunk_length = gr.Number(label="Chunk Length", value=None, precision=0,
146
  info="The length of audio segments. If it is not None, it will overwrite the default chunk_length of the FeatureExtractor.")
147
  nb_hallucination_silence_threshold = gr.Number(label="Hallucination Silence Threshold",
148
  value=None,
 
296
  info="If word_timestamps is True, merge these punctuation symbols with the previous word.")
297
  nb_max_new_tokens = gr.Number(label="Max New Tokens", value=None, precision=0,
298
  info="Maximum number of new tokens to generate per-chunk. If not set, the maximum will be set by the default max_length.")
299
+ nb_chunk_length = gr.Number(label="Chunk Length", value=None, precision=0,
300
  info="The length of audio segments. If it is not None, it will overwrite the default chunk_length of the FeatureExtractor.")
301
  nb_hallucination_silence_threshold = gr.Number(label="Hallucination Silence Threshold",
302
  value=None,
 
442
  info="If word_timestamps is True, merge these punctuation symbols with the previous word.")
443
  nb_max_new_tokens = gr.Number(label="Max New Tokens", value=None, precision=0,
444
  info="Maximum number of new tokens to generate per-chunk. If not set, the maximum will be set by the default max_length.")
445
+ nb_chunk_length = gr.Number(label="Chunk Length", value=None, precision=0,
446
  info="The length of audio segments. If it is not None, it will overwrite the default chunk_length of the FeatureExtractor.")
447
  nb_hallucination_silence_threshold = gr.Number(label="Hallucination Silence Threshold",
448
  value=None,
modules/whisper/whisper_parameter.py CHANGED
@@ -306,7 +306,7 @@ class WhisperValues:
306
  prepend_punctuations: Optional[str]
307
  append_punctuations: Optional[str]
308
  max_new_tokens: int
309
- chunk_length: float
310
  hallucination_silence_threshold: float
311
  hotwords: Optional[str]
312
  language_detection_threshold: float
 
306
  prepend_punctuations: Optional[str]
307
  append_punctuations: Optional[str]
308
  max_new_tokens: int
309
+ chunk_length: int
310
  hallucination_silence_threshold: float
311
  hotwords: Optional[str]
312
  language_detection_threshold: float