Spaces:
Running
Running
Arnab Das
commited on
Commit
·
78c0a0e
1
Parent(s):
24f6c93
visualization moved to crowdee
Browse files
app.py
CHANGED
@@ -12,19 +12,22 @@ def process(filepath):
|
|
12 |
global manpulate_config
|
13 |
out = infere(manipulate_model, filepath, manpulate_config)
|
14 |
out = out.tolist()
|
15 |
-
|
16 |
-
plt.
|
17 |
-
|
18 |
-
plt.plot(
|
19 |
-
|
|
|
|
|
|
|
20 |
demo = gr.Blocks()
|
21 |
file_proc = gr.Interface(
|
22 |
fn=process,
|
23 |
inputs=[
|
24 |
gr.Audio(sources=["microphone", "upload"], type="filepath", show_download_button=True, label="Speech file (<30s)", max_length=30),
|
25 |
],
|
26 |
-
outputs=["text"
|
27 |
-
gr.Plot(label="Frame wise prediction")
|
28 |
],
|
29 |
title="Find the manipulation: Analyze 'Real' or 'Manipulated' audio.",
|
30 |
description=(
|
|
|
12 |
global manpulate_config
|
13 |
out = infere(manipulate_model, filepath, manpulate_config)
|
14 |
out = out.tolist()
|
15 |
+
|
16 |
+
#plt.clf()
|
17 |
+
#plt.figure()
|
18 |
+
#plt.plot(out)
|
19 |
+
#out_masked = np.ma.masked_less_equal(out, 0.4)
|
20 |
+
#plt.plot(out_masked, 'r', linewidth=2)
|
21 |
+
#return str(out), plt
|
22 |
+
return str(out)
|
23 |
demo = gr.Blocks()
|
24 |
file_proc = gr.Interface(
|
25 |
fn=process,
|
26 |
inputs=[
|
27 |
gr.Audio(sources=["microphone", "upload"], type="filepath", show_download_button=True, label="Speech file (<30s)", max_length=30),
|
28 |
],
|
29 |
+
outputs=["text"
|
30 |
+
#gr.Plot(label="Frame wise prediction")
|
31 |
],
|
32 |
title="Find the manipulation: Analyze 'Real' or 'Manipulated' audio.",
|
33 |
description=(
|