mcp_tools / app.py
alihmaou's picture
Added a diagram generator (based on my drawittome tool)
c064abb
import gradio as gr
from tools import jokes, weather, datasetananalysis, diagrams
demo = gr.TabbedInterface(
[
gr.Interface(fn=diagrams.generateDiagram, inputs=["text","text"], outputs=["html","text","text"], title="Diagrams generator (candidate)", description="Generates a mermaid diagram to explain a submited text. The diagram is returned in different formats(svg and raw code)"),
gr.Interface(fn=jokes.smalljoke,inputs=["text"],outputs="text", title="Small joke teller (testing purposes)", description="Tells a small joke in french"),
gr.Interface(fn=jokes.longjoke,inputs=["text","text","text","text" ],outputs="text", title="Long joke teller (testing purposes)", description="Tells a longer joke in french"),
gr.Interface(fn=datasetananalysis.describedataset,inputs=["text" ],outputs="text", title="Dataset descriptor (mockup)", description="Provides a usefull description of a dataset to allow content and structure awareness before SQL requesting on it."),
],
[
"Générateur de diagrammes",
"Histoire courte (test)",
"Histoire longue (test)",
"Description d'un dataset (mockup)",
]
)
demo.launch(mcp_server=True, show_error=True)