Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,5 @@
|
|
1 |
import streamlit as st
|
2 |
from transformers import pipeline
|
3 |
-
from audio_recorder_streamlit import audio_recorder
|
4 |
|
5 |
pipe=pipeline(model="vennify/t5-base-grammar-correction")
|
6 |
st.title("Grammatical Error Checker")
|
@@ -10,6 +9,7 @@ if text:
|
|
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")
|
@@ -17,6 +17,8 @@ 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")
|
|
|
1 |
import streamlit as st
|
2 |
from transformers import pipeline
|
|
|
3 |
|
4 |
pipe=pipeline(model="vennify/t5-base-grammar-correction")
|
5 |
st.title("Grammatical Error Checker")
|
|
|
9 |
out=pipe(text)
|
10 |
st.text_area(label="Output sentence:", value=out)
|
11 |
|
12 |
+
from audio_recorder_streamlit import audio_recorder
|
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")
|
|
|
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 |
+
out_S=pipe(out_s)
|
21 |
+
st.text_area(label="Output sentence:", value=out_S)
|
22 |
|
23 |
|
24 |
pipe_p=pipeline(model="ramsrigouthamg/t5_sentence_paraphraser")
|