Abduhoshim commited on
Commit
e7f35e2
1 Parent(s): 4c18e0f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -57,6 +57,7 @@ def predict(audio):
57
  df_preds['emotion'] = emotions
58
  df_preds = df_preds.reset_index()
59
  fig = px.line(df_preds, x="index", y="emotion", title='Life expectancy in Canada')
 
60
  return fig
61
 
62
  outputs = gr.Plot()
@@ -66,6 +67,7 @@ description = "This model can shows how speaker emotion changes over the speech"
66
  infr = gr.Interface(fn=predict,
67
  inputs=gr.Audio(type="filepath"),
68
  examples=['audio_samples/1.mp3','audio_samples/2.mp3','audio_samples/3.mp3','audio_samples/4.mp3'],
 
69
  outputs=outputs,
70
  title=title,description=description,interpretation='default',)
71
  infr.launch()
 
57
  df_preds['emotion'] = emotions
58
  df_preds = df_preds.reset_index()
59
  fig = px.line(df_preds, x="index", y="emotion", title='Life expectancy in Canada')
60
+ fig.update_xaxes(title='The 3s intervals of speech')
61
  return fig
62
 
63
  outputs = gr.Plot()
 
67
  infr = gr.Interface(fn=predict,
68
  inputs=gr.Audio(type="filepath"),
69
  examples=['audio_samples/1.mp3','audio_samples/2.mp3','audio_samples/3.mp3','audio_samples/4.mp3'],
70
+ cache_examples=True,
71
  outputs=outputs,
72
  title=title,description=description,interpretation='default',)
73
  infr.launch()