Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,6 @@ pipe=pipeline(model="vennify/t5-base-grammar-correction")
|
|
6 |
st.title("Grammatical Error Checker")
|
7 |
st.header("Text input:")
|
8 |
text=st.text_area('Input sentence:')
|
9 |
-
|
10 |
if text:
|
11 |
out=pipe(text)
|
12 |
st.text_area(label="Output sentence:", value=out)
|
@@ -17,9 +16,10 @@ if audio_bytes:
|
|
17 |
st.audio(audio_bytes, format="audio/wav")
|
18 |
|
19 |
pipe_p=pipeline(model="ramsrigouthamg/t5_sentence_paraphraser")
|
|
|
|
|
20 |
st.title("Paraphraser")
|
21 |
text_p=st.text_area('Input sentence:')
|
22 |
-
|
23 |
if text_p:
|
24 |
out_p=pipe_p(text_p)
|
25 |
st.text_area(label="Output sentence:", value=out_p)
|
|
|
6 |
st.title("Grammatical Error Checker")
|
7 |
st.header("Text input:")
|
8 |
text=st.text_area('Input sentence:')
|
|
|
9 |
if text:
|
10 |
out=pipe(text)
|
11 |
st.text_area(label="Output sentence:", value=out)
|
|
|
16 |
st.audio(audio_bytes, format="audio/wav")
|
17 |
|
18 |
pipe_p=pipeline(model="ramsrigouthamg/t5_sentence_paraphraser")
|
19 |
+
import sentencepiece as spm
|
20 |
+
sp=spm.SentencePieceProcessor(model_file='t5_sentence_paraphraser/spiece.model')
|
21 |
st.title("Paraphraser")
|
22 |
text_p=st.text_area('Input sentence:')
|
|
|
23 |
if text_p:
|
24 |
out_p=pipe_p(text_p)
|
25 |
st.text_area(label="Output sentence:", value=out_p)
|