Spaces:
Runtime error
Runtime error
David_A
commited on
Commit
·
cc6e3d6
1
Parent(s):
ffde2f4
logo_test_5
Browse files- app.py +7 -7
- requirements.txt +1 -0
app.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
import gradio as gr
|
2 |
import whisper
|
3 |
import ffmpeg
|
|
|
4 |
|
5 |
|
6 |
def transcribe_audio(audio_file):
|
@@ -21,14 +22,13 @@ def transcribe_audio(audio_file):
|
|
21 |
def main():
|
22 |
audio_input = gr.inputs.Audio(source="upload", type="filepath")
|
23 |
output_text = gr.outputs.Textbox()
|
24 |
-
|
|
|
|
|
|
|
25 |
iface = gr.Interface(fn=transcribe_audio, inputs=audio_input,
|
26 |
outputs=output_text, title="Transciption Audio DIGITALIXSA",
|
27 |
-
description="Charger l'audio"
|
28 |
-
|
29 |
-
# Personnaliser la mise en page avec du HTML
|
30 |
-
#logo_html = '<img src="logo-digitalix.png" alt="Logo" width="50px">' # Balise HTML pour le logo
|
31 |
-
#iface.layout = gr.Interface.Layout(header=logo_html)
|
32 |
|
33 |
iface.launch(auth=("admin", "pass1234"))
|
34 |
|
@@ -36,4 +36,4 @@ def main():
|
|
36 |
if __name__ == '__main__':
|
37 |
main()
|
38 |
|
39 |
-
#
|
|
|
1 |
import gradio as gr
|
2 |
import whisper
|
3 |
import ffmpeg
|
4 |
+
import streamlit.components.v1 as components
|
5 |
|
6 |
|
7 |
def transcribe_audio(audio_file):
|
|
|
22 |
def main():
|
23 |
audio_input = gr.inputs.Audio(source="upload", type="filepath")
|
24 |
output_text = gr.outputs.Textbox()
|
25 |
+
logo_html = '<img src="logo-digitalix.png" alt="Logo" width="50px">' # Balise HTML pour le logo
|
26 |
+
|
27 |
+
# Créer un composant Streamlit avec le logo
|
28 |
+
components.html(logo_html)
|
29 |
iface = gr.Interface(fn=transcribe_audio, inputs=audio_input,
|
30 |
outputs=output_text, title="Transciption Audio DIGITALIXSA",
|
31 |
+
description="Charger l'audio")
|
|
|
|
|
|
|
|
|
32 |
|
33 |
iface.launch(auth=("admin", "pass1234"))
|
34 |
|
|
|
36 |
if __name__ == '__main__':
|
37 |
main()
|
38 |
|
39 |
+
#
|
requirements.txt
CHANGED
@@ -2,3 +2,4 @@ openai-whisper
|
|
2 |
setuptools-rust
|
3 |
ffmpeg-python
|
4 |
gradio
|
|
|
|
2 |
setuptools-rust
|
3 |
ffmpeg-python
|
4 |
gradio
|
5 |
+
streamlit
|