Spaces:
Sleeping
Sleeping
Update Demo.py
Browse files
Demo.py
CHANGED
@@ -119,7 +119,7 @@ st.sidebar.markdown("""
|
|
119 |
""", unsafe_allow_html=True)
|
120 |
|
121 |
# Load examples
|
122 |
-
AUDIO_FILE_PATH = "inputs"
|
123 |
audio_files = sorted(os.listdir(AUDIO_FILE_PATH))
|
124 |
|
125 |
selected_audio = st.selectbox("Select an audio", audio_files)
|
@@ -141,10 +141,9 @@ with open(selected_audio, 'rb') as audio_file:
|
|
141 |
audio_bytes = audio_file.read()
|
142 |
st.audio(audio_bytes)
|
143 |
|
144 |
-
st.subheader(f"Transcription for {selected_audio}:")
|
145 |
-
|
146 |
spark = init_spark()
|
147 |
pipeline = create_pipeline(model)
|
148 |
output = fit_data(pipeline, selected_audio)
|
149 |
|
150 |
-
st.
|
|
|
|
119 |
""", unsafe_allow_html=True)
|
120 |
|
121 |
# Load examples
|
122 |
+
AUDIO_FILE_PATH = "/content/Wav2Vec2ForCTC/inputs"
|
123 |
audio_files = sorted(os.listdir(AUDIO_FILE_PATH))
|
124 |
|
125 |
selected_audio = st.selectbox("Select an audio", audio_files)
|
|
|
141 |
audio_bytes = audio_file.read()
|
142 |
st.audio(audio_bytes)
|
143 |
|
|
|
|
|
144 |
spark = init_spark()
|
145 |
pipeline = create_pipeline(model)
|
146 |
output = fit_data(pipeline, selected_audio)
|
147 |
|
148 |
+
st.subheader(f"Transcription:")
|
149 |
+
st.markdown(f"**{output.first().result[0].strip()}**")
|