Spaces:
Running
Running
import gradio as gr | |
from interfaces.cap import demo as cap_demo | |
from interfaces.manifesto import demo as manifesto_demo | |
from interfaces.sentiment import demo as sentiment_demo | |
from interfaces.emotion import demo as emotion_demo | |
with gr.Blocks() as demo: | |
gr.Markdown( | |
""" | |
<div style="display: block; text-align: left; padding:0; margin:0;"> | |
<h1 style="text-align: center">Babel Machine Demo</h1> | |
<p>This is a demo for text classification using language models finetuned on data labeled by <a href="https://www.comparativeagendas.net/">CAP</a>, <a href="https://manifesto-project.wzb.eu/">Manifesto Project</a>, sentiment, and emotion coding systems.<br> | |
For the coding of complete datasets, please visit the official <a href="https://babel.poltextlab.com/">Babel Machine</a> site.</p> | |
</div> | |
""") | |
gr.TabbedInterface( | |
interface_list=[cap_demo, manifesto_demo, sentiment_demo, emotion_demo], | |
tab_names=["CAP", "Manifesto", "sentiment", "emotion"], | |
) | |
if __name__ == "__main__": | |
demo.launch() | |
# TODO: add all languages & domains |