Spaces:
Build error
Build error
| import gradio as gr | |
| import json | |
| from PIL import Image | |
| import numpy as np | |
| # --- User Defined Logic --- | |
| def multiplication(a: str, b: str) -> float: | |
| """Renvoie la multiplication de deux nombres soumis (prévoir conversion en nombre). | |
| Args: | |
| a: Premier nombre à multiplier (chaîne convertible en nombre). | |
| b: Deuxième nombre à multiplier (chaîne convertible en nombre). | |
| Returns: | |
| Le produit des deux nombres convertis en float. | |
| """ | |
| return float(a) * float(b) | |
| # --- Interface Factory --- | |
| def create_interface(): | |
| return gr.Interface( | |
| fn=multiplication, | |
| inputs=[gr.Textbox(label=k) for k in ['a', 'b']], | |
| outputs=gr.Textbox(label="Résultat de la multiplication"), | |
| title="multiplication", | |
| description="Auto-generated tool: multiplication" | |
| ) |