File size: 507 Bytes
3ece550 924d303 3ece550 669937f 924d303 3ece550 924d303 3ece550 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
import gradio as gr
from app.handler import predict
def launch_app():
iface = gr.Interface(
fn=predict,
inputs=[
gr.Textbox(label="Texte à analyser"),
gr.Dropdown(choices=["zero-shot", "few-shot"], label="Type de modèle", value="zero-shot")
],
outputs="markdown",
title="🧪 ToxiCheck",
description="Entrez un texte pour détecter s'il est toxique. Résultat avec score de confiance pour chaque label."
)
iface.launch() |