File size: 1,241 Bytes
2211366 8a7669a 2211366 5a6b27d c064abb 5a6b27d c064abb be4adf4 5a6b27d 2211366 5a6b27d 492e0af |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
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) |