Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -10,10 +10,14 @@ if text:
|
|
10 |
out=pipe(text)
|
11 |
st.text_area(label="Output sentence:", value=out)
|
12 |
|
|
|
13 |
st.header("Speech input:")
|
14 |
audio_bytes = audio_recorder(pause_threshold=2.0, sample_rate=41_000, recording_color="#e8b62c", neutral_color="#6aa36f", icon_name="user", icon_size="6x")
|
15 |
if audio_bytes:
|
16 |
st.audio(audio_bytes, format="audio/wav")
|
|
|
|
|
|
|
17 |
|
18 |
pipe_p=pipeline(model="ramsrigouthamg/t5_sentence_paraphraser")
|
19 |
import sentencepiece as spm
|
|
|
10 |
out=pipe(text)
|
11 |
st.text_area(label="Output sentence:", value=out)
|
12 |
|
13 |
+
pipe_s=pipeline(model="openai/whisper-large-v3")
|
14 |
st.header("Speech input:")
|
15 |
audio_bytes = audio_recorder(pause_threshold=2.0, sample_rate=41_000, recording_color="#e8b62c", neutral_color="#6aa36f", icon_name="user", icon_size="6x")
|
16 |
if audio_bytes:
|
17 |
st.audio(audio_bytes, format="audio/wav")
|
18 |
+
out_s=pipe_s(audio_bytes)
|
19 |
+
st.text_area(label="Input sentence:", value=out_s)
|
20 |
+
|
21 |
|
22 |
pipe_p=pipeline(model="ramsrigouthamg/t5_sentence_paraphraser")
|
23 |
import sentencepiece as spm
|