Spaces:
Build error
Build error
Create Welcom
Browse files
Welcom
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
|
| 3 |
+
# Fonction de réponse de base
|
| 4 |
+
def chatbot_response(message):
|
| 5 |
+
if "bonjour" in message.lower():
|
| 6 |
+
return "Bonjour ! Comment ça va ?"
|
| 7 |
+
return "Désolé, je ne comprends pas encore cette question."
|
| 8 |
+
|
| 9 |
+
# Interface Gradio
|
| 10 |
+
iface = gr.Interface(
|
| 11 |
+
fn=chatbot_response,
|
| 12 |
+
inputs="text",
|
| 13 |
+
outputs="text",
|
| 14 |
+
title="SemXFlow.co Chatbot",
|
| 15 |
+
description="Tapez 'bonjour' pour tester le chatbot."
|
| 16 |
+
)
|
| 17 |
+
|
| 18 |
+
iface.launch()
|