Spaces:
Sleeping
Sleeping
File size: 529 Bytes
78449ed |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
import streamlit as st
from transformers import pipeline
# Charger le modèle de génération de texte
@st.cache_resource
def load_model():
return pipeline("text-generation", model="mistralai/Mistral-7B-Instruct-v0.1")
bot = load_model()
# Interface du chatbot
st.title("Chatbot Restaurant 🍽️")
st.write("Posez vos questions sur le restaurant !")
user_input = st.text_input("Votre question :")
if user_input:
response = bot(user_input, max_length=200, do_sample=True)[0]["generated_text"]
st.write(response) |