File size: 1,146 Bytes
0a27e5e
 
7408f28
77ad6c3
6094f30
7408f28
8baa175
7408f28
 
8fc3414
7408f28
846309c
3cc8ce8
7408f28
6094f30
7408f28
6094f30
7408f28
 
8baa175
7408f28
 
 
8baa175
7408f28
8baa175
 
7408f28
 
8baa175
 
 
 
 
 
 
 
 
 
989276d
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
29
30
31
32
33
34
35
36
37
38
39
40
41
import gradio as gr

from src.nlp_circle_demo.interface import GradioInterfaceWrapper, GradioTabWrapper


robertaGer = GradioInterfaceWrapper.from_yaml(
    "resources/legal_german_roberta_interface.yml"
)
gbert = GradioInterfaceWrapper.from_yaml("resources/gbert_interface.yml")

legalInterface = GradioTabWrapper.from_interface_list("Legal", [robertaGer, gbert])


ner = GradioInterfaceWrapper.from_yaml("resources/ner_interface.yml")

zeroShot = GradioInterfaceWrapper.from_yaml("resources/zero_shot_interface.yml")

qaInterface = GradioInterfaceWrapper.from_yaml("resources/qa_interface.yml")
simplicationInterface = GradioInterfaceWrapper.from_yaml(
    "resources/simplification_interface.yml"
)
gptInterface = GradioInterfaceWrapper.from_yaml("resources/gpt2_interface.yml")
summarizationInterface = GradioInterfaceWrapper.from_yaml(
    "resources/summarization_interface.yml"
)


demo = GradioTabWrapper.from_interface_list(
    "NLP Demo-Seite",
    [
        gptInterface,
        legalInterface,
        qaInterface,
        summarizationInterface,
        simplicationInterface,
        ner,
        zeroShot,
    ],
)
demo.launch()