BoburAmirov commited on
Commit
4f7b1a6
·
1 Parent(s): 244876a

gradio check version

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -108,7 +108,7 @@ def yt_transcribe(yt_url, task, return_timestamps, language, max_filesize=75.0):
108
 
109
  # Map the language names to their corresponding codes
110
  language_codes = {"English": "en", "Uzbek": "uz"}
111
- language_code = language_codes.get(language, "en") # Default to "en" if the language is not found
112
 
113
  result = pipe(inputs, batch_size=BATCH_SIZE, generate_kwargs={"task": task, "language": f"<|{language_code}|>"},
114
  return_timestamps=return_timestamps)
@@ -120,7 +120,7 @@ def yt_transcribe(yt_url, task, return_timestamps, language, max_filesize=75.0):
120
 
121
 
122
  demo = gr.Blocks()
123
-
124
  mf_transcribe = gr.Interface(
125
  fn=transcribe,
126
  inputs=[
@@ -132,7 +132,7 @@ mf_transcribe = gr.Interface(
132
  outputs="text",
133
  layout="horizontal",
134
  theme="huggingface",
135
- title="Whisper Large V3 Uzbek: Transcribe Audio",
136
  description=(
137
  "\n\n"
138
  "<center>⭐️Brought to you by <a href='https://note.com/sangmin/n/n9813f2064a6a'>Chiomirai School</a>⭐️</center>"
@@ -151,7 +151,7 @@ file_transcribe = gr.Interface(
151
  outputs="text",
152
  layout="horizontal",
153
  theme="huggingface",
154
- title="Whisper Large V3 Uzbek: Transcribe Audio File",
155
  description=(
156
  "\n\n"
157
  "<center>⭐️Brought to you by <a href='https://note.com/sangmin/n/n9813f2064a6a'>Chiomirai School</a>⭐️</center>"
@@ -170,7 +170,7 @@ yt_transcribe = gr.Interface(
170
  outputs=["html", "text"],
171
  layout="horizontal",
172
  theme="huggingface",
173
- title="Whisper Large V3 Uzbek: Transcribe YouTube",
174
  description=(
175
  "\n\n"
176
  "<center>⭐️Brought to you by <a href='https://note.com/sangmin/n/n9813f2064a6a'>Chiomirai School</a>⭐️</center>"
 
108
 
109
  # Map the language names to their corresponding codes
110
  language_codes = {"English": "en", "Uzbek": "uz"}
111
+ language_code = language_codes.get(language, "uz") # Default to "en" if the language is not found
112
 
113
  result = pipe(inputs, batch_size=BATCH_SIZE, generate_kwargs={"task": task, "language": f"<|{language_code}|>"},
114
  return_timestamps=return_timestamps)
 
120
 
121
 
122
  demo = gr.Blocks()
123
+ print((gr.__version__), 'gradio version check')
124
  mf_transcribe = gr.Interface(
125
  fn=transcribe,
126
  inputs=[
 
132
  outputs="text",
133
  layout="horizontal",
134
  theme="huggingface",
135
+ title="Whisper Small v1 Uzbek: Transcribe Audio",
136
  description=(
137
  "\n\n"
138
  "<center>⭐️Brought to you by <a href='https://note.com/sangmin/n/n9813f2064a6a'>Chiomirai School</a>⭐️</center>"
 
151
  outputs="text",
152
  layout="horizontal",
153
  theme="huggingface",
154
+ title="Whisper Small v1 Uzbek: Transcribe Audio File",
155
  description=(
156
  "\n\n"
157
  "<center>⭐️Brought to you by <a href='https://note.com/sangmin/n/n9813f2064a6a'>Chiomirai School</a>⭐️</center>"
 
170
  outputs=["html", "text"],
171
  layout="horizontal",
172
  theme="huggingface",
173
+ title="Whisper Small v1 Uzbek: Transcribe YouTube",
174
  description=(
175
  "\n\n"
176
  "<center>⭐️Brought to you by <a href='https://note.com/sangmin/n/n9813f2064a6a'>Chiomirai School</a>⭐️</center>"