Haseeb230602 commited on
Commit
961aa52
·
verified ·
1 Parent(s): 0c398bd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -1,5 +1,6 @@
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")
@@ -7,4 +8,8 @@ text=st.text_area('Enter some text:')
7
 
8
  if text:
9
  out=pipe(text)
10
- st.json(out)
 
 
 
 
 
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")
 
8
 
9
  if text:
10
  out=pipe(text)
11
+ st.json(out)
12
+
13
+ audio_bytes = audio_recorder(pause_threshold=2.0, sample_rate=41_000, recording_color="#e8b62c", neutral_color="#6aa36f", icon_name="user", icon_size="6x")
14
+ if audio_bytes:
15
+ st.audio(audio_bytes, format="audio/wav")