lorenzoscottb commited on
Commit
6f7fea8
Β·
1 Parent(s): 79284d9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -2,16 +2,19 @@
2
  import numpy as np
3
  import gradio as gr
4
  from gradio.mix import Series
 
 
 
5
 
6
  description = "This space mixes the large-multilingual [emotion classification model of DReAMy](https://github.com/lorenzoscottb/DReAMy) with the whisper model from OpenAI, to directly classify recording according to the Hall and Van de Castle framework, with respect to emotions."
7
  title = "DReAM v. II"
8
 
9
- wisper = gr.Interface.load("models/openai/whisper-base")
10
 
11
  interface_model_L = gr.Interface.load("models/DReAMy-lib/xlm-roberta-large-DreamBank-emotion-presence")
12
 
13
- Series(
14
- wisper,
15
  interface_model_L,
16
  description = description,
17
  title = title,
 
2
  import numpy as np
3
  import gradio as gr
4
  from gradio.mix import Series
5
+ import OSError
6
+
7
+ os.environ['CUDA_LAUNCH_BLOCKING'] = '1' # added after repeated runtime erros (seems with whisper)
8
 
9
  description = "This space mixes the large-multilingual [emotion classification model of DReAMy](https://github.com/lorenzoscottb/DReAMy) with the whisper model from OpenAI, to directly classify recording according to the Hall and Van de Castle framework, with respect to emotions."
10
  title = "DReAM v. II"
11
 
12
+ whisper = gr.Interface.load("models/openai/whisper-base")
13
 
14
  interface_model_L = gr.Interface.load("models/DReAMy-lib/xlm-roberta-large-DreamBank-emotion-presence")
15
 
16
+ Series(
17
+ whisper,
18
  interface_model_L,
19
  description = description,
20
  title = title,