CoolFace
Apppublic

sanjaymalladi/AI_Document_Chat_Assistant

sourceHugging Faceotherupdated 2y agoView on Hugging Face
1likes
App README

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

  1. 1.Clone this repository
  2. 2.Install the required dependencies:
bash
   pip install -r requirements.txt
  1. 1.Create a .env file and add your Mistral AI API key:
   MISTRAL_API_KEY=your_api_key_here

Get your API key from Mistral AI Platform

Running the Application

Run the application using Streamlit:

bash
streamlit run app.py

The application will open in your default web browser at http://localhost:8501.

Usage

  1. 1.Enter your message in the chat input at the bottom of the screen
  2. 2.Press Enter to send your message
  3. 3.Wait for the AI's response
  4. 4.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.