Spaces:
Running
Running
Commit
·
5277bc9
1
Parent(s):
08ba651
Update app.py
Browse files
app.py
CHANGED
@@ -63,25 +63,6 @@ css = """
|
|
63 |
--tw-ring-color: rgb(191 219 254 / var(--tw-ring-opacity));
|
64 |
--tw-ring-opacity: .5;
|
65 |
}
|
66 |
-
.footer {
|
67 |
-
margin-bottom: 45px;
|
68 |
-
margin-top: 35px;
|
69 |
-
text-align: center;
|
70 |
-
border-bottom: 1px solid #e5e5e5;
|
71 |
-
}
|
72 |
-
.footer>p {
|
73 |
-
font-size: .8rem;
|
74 |
-
display: inline-block;
|
75 |
-
padding: 0 10px;
|
76 |
-
transform: translateY(10px);
|
77 |
-
background: white;
|
78 |
-
}
|
79 |
-
.dark .footer {
|
80 |
-
border-color: #303030;
|
81 |
-
}
|
82 |
-
.dark .footer>p {
|
83 |
-
background: #0b0f19;
|
84 |
-
}
|
85 |
.prompt h4{
|
86 |
margin: 1.25em 0 .25em 0;
|
87 |
font-weight: bold;
|
@@ -159,13 +140,8 @@ with block:
|
|
159 |
<rect x="23" y="69" width="23" height="23" fill="black"></rect>
|
160 |
</svg>
|
161 |
<h1 style="font-weight: 900; margin-bottom: 7px;">
|
162 |
-
Whisper
|
163 |
</h1>
|
164 |
</div>
|
165 |
-
<p style="margin-bottom: 10px; font-size: 94%">
|
166 |
-
Whisper is a general-purpose speech recognition model. It is trained on a large dataset of diverse audio and is also a multi-task model that can perform multilingual speech recognition as well as speech translation and language identification. This demo cuts audio after around 30 secs.
|
167 |
-
</p>
|
168 |
-
<p>You can skip the queue by using google colab for the space: <a href="https://colab.research.google.com/drive/1WJ98KHgZxFGrHiMm4TyWZllSew_Af_ff?usp=sharing"><img data-canonical-src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab" src="https://camo.githubusercontent.com/84f0493939e0c4de4e6dbe113251b4bfb5353e57134ffd9fcab6b8714514d4d1/68747470733a2f2f636f6c61622e72657365617263682e676f6f676c652e636f6d2f6173736574732f636f6c61622d62616467652e737667"></a></p>
|
169 |
</div>
|
170 |
"""
|
171 |
)
|
@@ -182,21 +158,13 @@ with block:
|
|
182 |
btn = gr.Button("Transcribe")
|
183 |
text = gr.Textbox(show_label=False, elem_id="result-textarea")
|
184 |
with gr.Group(elem_id="share-btn-container"):
|
185 |
-
community_icon = gr.HTML(community_icon_html, visible=False)
|
186 |
loading_icon = gr.HTML(loading_icon_html, visible=False)
|
187 |
-
|
188 |
|
189 |
|
190 |
|
191 |
|
192 |
-
btn.click(inference, inputs=[audio], outputs=[text,
|
193 |
-
|
194 |
-
|
195 |
-
gr.HTML('''
|
196 |
-
<div class="footer">
|
197 |
-
<p>Model by <a href="https://github.com/openai/whisper" style="text-decoration: underline;" target="_blank">OpenAI</a> - Gradio Demo by 🤗 Hugging Face
|
198 |
-
</p>
|
199 |
-
</div>
|
200 |
-
''')
|
201 |
|
202 |
block.launch()
|
|
|
63 |
--tw-ring-color: rgb(191 219 254 / var(--tw-ring-opacity));
|
64 |
--tw-ring-opacity: .5;
|
65 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
.prompt h4{
|
67 |
margin: 1.25em 0 .25em 0;
|
68 |
font-weight: bold;
|
|
|
140 |
<rect x="23" y="69" width="23" height="23" fill="black"></rect>
|
141 |
</svg>
|
142 |
<h1 style="font-weight: 900; margin-bottom: 7px;">
|
|
|
143 |
</h1>
|
144 |
</div>
|
|
|
|
|
|
|
|
|
145 |
</div>
|
146 |
"""
|
147 |
)
|
|
|
158 |
btn = gr.Button("Transcribe")
|
159 |
text = gr.Textbox(show_label=False, elem_id="result-textarea")
|
160 |
with gr.Group(elem_id="share-btn-container"):
|
|
|
161 |
loading_icon = gr.HTML(loading_icon_html, visible=False)
|
162 |
+
|
163 |
|
164 |
|
165 |
|
166 |
|
167 |
+
btn.click(inference, inputs=[audio], outputs=[text, loading_icon])
|
168 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
169 |
|
170 |
block.launch()
|