Spaces:
Sleeping
Sleeping
File size: 1,416 Bytes
0a27e5e c968e7e 77ad6c3 c968e7e 6094f30 c968e7e 8fc3414 c968e7e 846309c f80a7c6 c968e7e 3cc8ce8 c968e7e 6094f30 c968e7e 6094f30 a56dba2 c968e7e 3cc8ce8 6094f30 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 |
import gradio as gr
from src.nlp_circle_demo.interface import GradioElementWrapper
GradioElementWrapper.interface_from_yaml("resources/qa_interface.yml")
robertaGer = GradioElementWrapper.interface_from_yaml("resources/legal_german_roberta_interface.yml").gradio_element
gbert = GradioElementWrapper.interface_from_yaml("resources/gbert_interface.yml").gradio_element
ner = GradioElementWrapper.interface_from_yaml("resources/ner_interface.yml").gradio_element
zeroShot = GradioElementWrapper.interface_from_yaml("resources/zero_shot_interface.yml").gradio_element
legalInterface = gr.TabbedInterface([robertaGer, gbert], ["Roberta Legal", "Bert"])
qaInterface = GradioElementWrapper.interface_from_yaml("resources/qa_interface.yml").gradio_element
simplicationInterface = GradioElementWrapper.interface_from_yaml("resources/simplification_interface.yml").gradio_element
gptInterface = GradioElementWrapper.interface_from_yaml("resources/gpt2_interface.yml").gradio_element
summarizationInterface = GradioElementWrapper.interface_from_yaml("resources/summarization_interface.yml").gradio_element
demo = gr.TabbedInterface([gptInterface, legalInterface ,qaInterface, summarizationInterface, simplicationInterface, ner, zeroShot], [
"GPT", "Legal", "Question Answering", "Summarization", "Simplification", "Named Entity Recognition", "Zero-Shot-Klassifizierung"])
demo.launch()
|