File size: 827 Bytes
967f284
 
86ef0b6
 
 
 
 
 
41dc826
86ef0b6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
28
29
30
31
32
import gradio as gr

# Define custom CSS for a pastel gradient
css = """
.gradio-container {
    background: linear-gradient(to right, #FFDEE9, #B5FFFC);
}
"""

def respond(message):
    # Simple example function returning a response
    return f"Vous avez dit: {message}"

with gr.Blocks(css=css) as demo:
    # Display the greeting message
    gr.Markdown(
        "<h1 style='text-align: center;'>Bonjour Dans le chat du consentement</h1>"
    )

    # Create a simple text input and output
    with gr.Row():
        user_input = gr.Textbox(label="Entrez votre message ici")
        btn = gr.Button("Envoyer")
    output = gr.Textbox(label="Réponse")

    # Link the button to the respond function
    btn.click(fn=respond, inputs=user_input, outputs=output)

# Launch the app
if __name__ == "__main__":
    demo.launch()