Spaces:
Running
Running
jhj0517
commited on
Commit
·
ac4bff9
1
Parent(s):
1599c90
add `condition_on_previous_text`
Browse files
modules/whisper_data_class.py
CHANGED
@@ -13,6 +13,7 @@ class WhisperGradioComponents:
|
|
13 |
compute_type: gr.Dropdown
|
14 |
best_of: gr.Number
|
15 |
patience: gr.Number
|
|
|
16 |
"""
|
17 |
A data class to pass Gradio components to the function before Gradio pre-processing.
|
18 |
See this documentation for more information about Gradio pre-processing: https://www.gradio.app/docs/components
|
@@ -41,6 +42,10 @@ class WhisperGradioComponents:
|
|
41 |
Number of candidates when sampling with non-zero temperature.
|
42 |
patience: gr.Number
|
43 |
Beam search patience factor.
|
|
|
|
|
|
|
|
|
44 |
"""
|
45 |
|
46 |
def to_list(self) -> list:
|
@@ -66,6 +71,7 @@ class WhisperValues:
|
|
66 |
compute_type: str
|
67 |
best_of: int
|
68 |
patience: float
|
|
|
69 |
"""
|
70 |
A data class to use Whisper parameters in your function after Gradio pre-processing.
|
71 |
See this documentation for more information about Gradio pre-processing: : https://www.gradio.app/docs/components
|
|
|
13 |
compute_type: gr.Dropdown
|
14 |
best_of: gr.Number
|
15 |
patience: gr.Number
|
16 |
+
condition_on_previous_text: gr.Checkbox
|
17 |
"""
|
18 |
A data class to pass Gradio components to the function before Gradio pre-processing.
|
19 |
See this documentation for more information about Gradio pre-processing: https://www.gradio.app/docs/components
|
|
|
42 |
Number of candidates when sampling with non-zero temperature.
|
43 |
patience: gr.Number
|
44 |
Beam search patience factor.
|
45 |
+
condition_on_previous_text: bool
|
46 |
+
if True, the previous output of the model is provided as a prompt for the next window;
|
47 |
+
disabling may make the text inconsistent across windows, but the model becomes less prone to
|
48 |
+
getting stuck in a failure loop, such as repetition looping or timestamps going out of sync.
|
49 |
"""
|
50 |
|
51 |
def to_list(self) -> list:
|
|
|
71 |
compute_type: str
|
72 |
best_of: int
|
73 |
patience: float
|
74 |
+
condition_on_previous_text: bool
|
75 |
"""
|
76 |
A data class to use Whisper parameters in your function after Gradio pre-processing.
|
77 |
See this documentation for more information about Gradio pre-processing: : https://www.gradio.app/docs/components
|