Spaces:
Runtime error
Runtime error
A newer version of the Streamlit SDK is available:
1.51.0
metadata
title: Mistral AI Chat Application
emoji: π
colorFrom: gray
colorTo: green
sdk: streamlit
sdk_version: 1.42.2
app_file: app.py
pinned: false
license: other
Mistral AI Chat Application
A Streamlit-based chat application powered by Mistral AI's language models.
Features
- Clean and intuitive chat interface
- Real-time responses from Mistral AI
- Message history persistence
- Easy-to-use sidebar controls
- Responsive design
Setup
- Clone this repository
- Install the required dependencies:
pip install -r requirements.txt - Create a
.envfile and add your Mistral AI API key:
Get your API key from Mistral AI PlatformMISTRAL_API_KEY=your_api_key_here
Running the Application
Run the application using Streamlit:
streamlit run app.py
The application will open in your default web browser at http://localhost:8501.
Usage
- Enter your message in the chat input at the bottom of the screen
- Press Enter to send your message
- Wait for the AI's response
- Use the "Clear Chat" button in the sidebar to start a new conversation
Models Available
The application uses the following Mistral AI models:
- mistral-tiny (default)
- mistral-small
- mistral-medium
To change the model, modify the model parameter in the client.chat() function call in app.py.
Requirements
- Python 3.7+
- Streamlit
- Mistral AI Python SDK
- python-dotenv
Note
Make sure to keep your API key secure and never commit it to version control.