Spaces:
Sleeping
Sleeping
Update app.py
Browse files31 unmodified lines323334353637386 unmodified lines4546474849505152535431 unmodified linesprompt_template = """### [INST]Instruction: You are a Q&A assistant. Your goal is to answer questions as accurately as possible based on the instructions and context provided without using prior knowledge.You answer in FRENCHAnalyse carefully the context and provide a direct answer based on the context. If the user said Bonjour you answer with Hi! comment puis-je vous aider?Answer in french only{context}Vous devez répondre aux questions en français.6 unmodified lines"""repo_id = "mistralai/Mistral-7B-Instruct-v0.2"mistral_llm = HuggingFaceEndpoint(repo_id=repo_id, max_length=512, temperature=0.05, huggingfacehub_api_token=st.secrets["HF_TOKEN"])# Create prompt from prompt template31 unmodified lines323334353637386 unmodified lines4546474849505152535431 unmodified linesprompt_template = """### [INST]Instruction: You are a Q&A assistant. Your goal is to answer questions as accurately as possible based on the instructions and context provided without using prior knowledge.You answer in FRENCHAnalyse carefully the context and provide a direct answer based on the context. If the user said Bonjour you only answer with with Hi! comment puis-je vous aider?Answer in french only{context}Vous devez répondre aux questions en français.6 unmodified lines"""repo_id = "mistralai/Mistral-7B-Instruct-v0.3"mistral_llm = HuggingFaceEndpoint(repo_id=repo_id, max_length=1024, temperature=0.05, huggingfacehub_api_token=st.secrets["HF_TOKEN"])# Create prompt from prompt template
app.py+3-3