Spaces:
Running
Running
Upload app.py
Browse files
app.py
CHANGED
|
@@ -179,13 +179,15 @@ def model_inference(
|
|
| 179 |
if output_format == "纯净文本":
|
| 180 |
return rich_transcription_postprocess(raw_text)
|
| 181 |
elif output_format == "原始富文本":
|
| 182 |
-
|
| 183 |
-
return srt_raw if srt_raw else raw_text
|
| 184 |
elif output_format == "Emoji 格式":
|
| 185 |
return format_to_emoji(raw_text)
|
| 186 |
elif output_format == "SRT 字幕":
|
| 187 |
srt_result = generate_srt(sentence_info, clean=True)
|
| 188 |
return srt_result if srt_result else rich_transcription_postprocess(raw_text)
|
|
|
|
|
|
|
|
|
|
| 189 |
return raw_text
|
| 190 |
|
| 191 |
|
|
@@ -194,14 +196,20 @@ custom_css = """
|
|
| 194 |
body, .gradio-container {
|
| 195 |
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
|
| 196 |
}
|
| 197 |
-
|
|
|
|
| 198 |
cursor: pointer !important;
|
| 199 |
}
|
| 200 |
-
|
| 201 |
-
|
|
|
|
|
|
|
| 202 |
}
|
| 203 |
-
|
| 204 |
-
|
|
|
|
|
|
|
|
|
|
| 205 |
}
|
| 206 |
"""
|
| 207 |
lang_options = [
|
|
|
|
| 179 |
if output_format == "纯净文本":
|
| 180 |
return rich_transcription_postprocess(raw_text)
|
| 181 |
elif output_format == "原始富文本":
|
| 182 |
+
return raw_text
|
|
|
|
| 183 |
elif output_format == "Emoji 格式":
|
| 184 |
return format_to_emoji(raw_text)
|
| 185 |
elif output_format == "SRT 字幕":
|
| 186 |
srt_result = generate_srt(sentence_info, clean=True)
|
| 187 |
return srt_result if srt_result else rich_transcription_postprocess(raw_text)
|
| 188 |
+
elif output_format == "MASTER_DATA":
|
| 189 |
+
srt_raw = generate_srt(sentence_info, clean=False)
|
| 190 |
+
return srt_raw if srt_raw else raw_text
|
| 191 |
return raw_text
|
| 192 |
|
| 193 |
|
|
|
|
| 196 |
body, .gradio-container {
|
| 197 |
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
|
| 198 |
}
|
| 199 |
+
div[data-testid="dropdown"],
|
| 200 |
+
div[data-testid="dropdown"] * {
|
| 201 |
cursor: pointer !important;
|
| 202 |
}
|
| 203 |
+
div[data-testid="dropdown"] svg,
|
| 204 |
+
.dropdown-arrow {
|
| 205 |
+
transition: transform 0.2s ease-in-out !important;
|
| 206 |
+
transform-origin: 50% 50% !important;
|
| 207 |
}
|
| 208 |
+
div[data-testid="dropdown"]:focus-within svg,
|
| 209 |
+
div[data-testid="dropdown"]:has(ul) svg,
|
| 210 |
+
div[data-testid="dropdown"]:has(.options) svg,
|
| 211 |
+
div[data-testid="dropdown"][aria-expanded="true"] svg {
|
| 212 |
+
transform: rotate(180deg) !important;
|
| 213 |
}
|
| 214 |
"""
|
| 215 |
lang_options = [
|