slapula commited on
Commit
47c3f01
1 Parent(s): 6034da8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -10
app.py CHANGED
@@ -16,6 +16,11 @@ pipe = pipeline(
16
  device=device,
17
  )
18
 
 
 
 
 
 
19
 
20
  # Copied from https://github.com/openai/whisper/blob/c09a7ae299c4c34c5839a76380ae407e7d785914/whisper/utils.py#L50
21
  def format_timestamp(seconds: float, always_include_hours: bool = False, decimal_marker: str = "."):
@@ -70,11 +75,7 @@ mic_transcribe = gr.Interface(
70
  layout="vertical",
71
  theme="huggingface",
72
  title="Vietnamese Pronounciation Checker",
73
- description=(
74
- "This space transcribes Vietnamese words, phrases, and sentences via microphone or audio files then compares the user's text input to what the language model hears.\n"
75
- "You will then be given a PASS/FAIL grade to tell you if your spoken audio matches the text you entered.\n"
76
- f"[{MODEL_NAME}](https://huggingface.co/{MODEL_NAME}) is a Vietnamese Speech-to-Text model and powers the analysis of the audio files.\n"
77
- ),
78
  allow_flagging="never",
79
  )
80
 
@@ -89,11 +90,7 @@ file_transcribe = gr.Interface(
89
  layout="vertical",
90
  theme="huggingface",
91
  title="Vietnamese Pronounciation Checker",
92
- description=(
93
- "This space transcribes Vietnamese words, phrases, and sentences via microphone or audio files then compares the user's text input to what the language model hears.\n"
94
- "You will then be given a PASS/FAIL grade to tell you if your spoken audio matches the text you entered.\n"
95
- f"[{MODEL_NAME}](https://huggingface.co/{MODEL_NAME}) is a Vietnamese Speech-to-Text model and powers the analysis of the audio files.\n"
96
- ),
97
  examples=[
98
  ["./example.flac", "transcribe", False],
99
  ["./example.flac", "transcribe", True],
 
16
  device=device,
17
  )
18
 
19
+ desc = f"""
20
+ This space transcribes Vietnamese words, phrases, and sentences via microphone or audio files then compares the user's text input to what the language model hears.
21
+ You will then be given a PASS/FAIL grade to tell you if your spoken audio matches the text you entered.
22
+ [{MODEL_NAME}](https://huggingface.co/{MODEL_NAME}) is the Vietnamese Speech-to-Text model that powers the analysis of the audio files.
23
+ """
24
 
25
  # Copied from https://github.com/openai/whisper/blob/c09a7ae299c4c34c5839a76380ae407e7d785914/whisper/utils.py#L50
26
  def format_timestamp(seconds: float, always_include_hours: bool = False, decimal_marker: str = "."):
 
75
  layout="vertical",
76
  theme="huggingface",
77
  title="Vietnamese Pronounciation Checker",
78
+ description=(desc),
 
 
 
 
79
  allow_flagging="never",
80
  )
81
 
 
90
  layout="vertical",
91
  theme="huggingface",
92
  title="Vietnamese Pronounciation Checker",
93
+ description=(desc),
 
 
 
 
94
  examples=[
95
  ["./example.flac", "transcribe", False],
96
  ["./example.flac", "transcribe", True],