Spaces:
Sleeping
Sleeping
Commit
·
ac8d0e5
1
Parent(s):
664ecda
Update app.py
Browse files
app.py
CHANGED
@@ -3,6 +3,9 @@
|
|
3 |
# >>>> https://huggingface.co/spaces/khxu/pegasus-text-summarizers/blob/main/app.py
|
4 |
# Audio Interface
|
5 |
# >>>> https://huggingface.co/spaces/iSky/Speech-audio-to-text-with-grammar-correction/blob/main/app.py
|
|
|
|
|
|
|
6 |
|
7 |
import gradio as gr
|
8 |
from transformers import pipeline
|
@@ -20,14 +23,14 @@ def out(audio):
|
|
20 |
if audio==None:
|
21 |
return "no audio"
|
22 |
|
23 |
-
|
24 |
a = s2t(audio)
|
25 |
#g = grammar(a)
|
26 |
#s = sum_it(g) # Summarize Audio with sum_it
|
27 |
-
return a #grammar(a, num_return_sequences=1) # grammar(s), # Grammar Filter
|
28 |
|
29 |
-
else:
|
30 |
-
|
31 |
|
32 |
# Construct Interfaces:
|
33 |
iface = gr.Interface(
|
|
|
3 |
# >>>> https://huggingface.co/spaces/khxu/pegasus-text-summarizers/blob/main/app.py
|
4 |
# Audio Interface
|
5 |
# >>>> https://huggingface.co/spaces/iSky/Speech-audio-to-text-with-grammar-correction/blob/main/app.py
|
6 |
+
# Gramar
|
7 |
+
# >>>> https://huggingface.co/deep-learning-analytics/GrammarCorrector/blob/main/README.md
|
8 |
+
|
9 |
|
10 |
import gradio as gr
|
11 |
from transformers import pipeline
|
|
|
23 |
if audio==None:
|
24 |
return "no audio"
|
25 |
|
26 |
+
else:
|
27 |
a = s2t(audio)
|
28 |
#g = grammar(a)
|
29 |
#s = sum_it(g) # Summarize Audio with sum_it
|
30 |
+
return a, a #grammar(a, num_return_sequences=1) # grammar(s), # Grammar Filter
|
31 |
|
32 |
+
#else:
|
33 |
+
# return "something is wrong in the function?"
|
34 |
|
35 |
# Construct Interfaces:
|
36 |
iface = gr.Interface(
|