File size: 962 Bytes
8b4c65a
72fadc4
 
6f7fea8
00a9bce
 
 
 
 
 
 
 
 
 
2db1482
72fadc4
2cb1396
cbb2414
d757f0d
cbb2414
6f7fea8
 
8b4c65a
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28

import gradio as gr
from gradio.mix import Series

description = """
 This space mixes DReAMy's large-multilingual [emotion-classification model](https://github.com/lorenzoscottb/DReAMy) with Whisper from OpenAI, 
 to classify recordings on their emotional content accordingly to the Hall and Van de Castle framework. For more details, 
 see the [Bertolini et al., 23](https://arxiv.org/abs/2302.14828v1) pre-print.



 Disclaimer: if you run into the `503, Error: Model [model_name] is currently loading` error message, just wait and or refresh the page. 
 The indicated model still has to be loaded by the API.
"""
title       = "DReAM v. II"

whisper = gr.Interface.load("models/openai/whisper-large")

interface_model_L = gr.Interface.load("models/DReAMy-lib/xlm-roberta-large-DreamBank-emotion-presence")

Series(
    whisper, 
    interface_model_L,
    description = description,
    title = title,
    inputs = gr.Audio(source="microphone"),
).launch()