File size: 733 Bytes
3eeaf52
 
 
 
 
 
 
3fd48fe
 
 
 
3eeaf52
 
1eba0ee
3eeaf52
 
 
 
9ce0580
1eba0ee
3eeaf52
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import gradio as gr

def generate_data(subject, input_field, difficulty):
    # Traiter les données ici, par exemple imprimer les données
    print("Sujet:", subject)
    print("Input:", input_field)
    print("Difficulté:", difficulty)

    q = """When $a \ne 0$, there are two solutions to \(ax^2 + bx + c = 0\) and they are
$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$"""
    return q

# Créer l'interface utilisateur Gradio


# Créer l'interface utilisateur avec les composants créés
interface = gr.Interface(
    fn=generate_data,
    inputs=[gr.Textbox(), gr.Textbox(), gr.Textbox()] ,
    outputs=gr.Textbox(),
    title="Génération de données",
    theme="light"
)

# Lancer l'interface utilisateur
interface.launch()