Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -15,5 +15,11 @@ st.write("Posez vos questions sur le restaurant !")
|
|
| 15 |
user_input = st.text_input("Votre question :")
|
| 16 |
|
| 17 |
if user_input:
|
| 18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
st.write(response)
|
|
|
|
| 15 |
user_input = st.text_input("Votre question :")
|
| 16 |
|
| 17 |
if user_input:
|
| 18 |
+
# Ajouter un prompt pour guider le modèle
|
| 19 |
+
prompt = f"Tu es un chatbot pour un restaurant. Réponds aux questions de manière amicale et informative. Voici la question : {user_input}"
|
| 20 |
+
|
| 21 |
+
# Générer la réponse du bot
|
| 22 |
+
response = bot(prompt, max_length=100, do_sample=True)[0]["generated_text"]
|
| 23 |
+
|
| 24 |
+
# Afficher la réponse
|
| 25 |
st.write(response)
|