Spaces:
Sleeping
Sleeping
Delete README.md
Browse files
README.md
DELETED
|
@@ -1,127 +0,0 @@
|
|
| 1 |
-
# AI Assistant API
|
| 2 |
-
|
| 3 |
-
## π Overview
|
| 4 |
-
|
| 5 |
-
This project is an AI-powered assistant that uses FastAPI and FAISS for retrieval-augmented generation (RAG). It processes user queries using a vector database and evaluates responses with Opik.
|
| 6 |
-
|
| 7 |
-
## π οΈ Features
|
| 8 |
-
|
| 9 |
-
- Upload and manage datasets
|
| 10 |
-
- Query AI assistant with domain-specific constraints
|
| 11 |
-
- Use FAISS for efficient document retrieval
|
| 12 |
-
- Evaluate LLM responses using Opik
|
| 13 |
-
|
| 14 |
-
## π½οΈ Demo Video
|
| 15 |
-
|
| 16 |
-
[π₯ Click here to watch the demo](https://drive.google.com/file/d/10h4VnTm_y5SBczI6NnoTuqRxyq55HAn5/view?usp=sharing)
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
## π¦ Installation
|
| 20 |
-
|
| 21 |
-
### Install Ollama
|
| 22 |
-
|
| 23 |
-
Ollama is required for this project. Follow these steps to install it:
|
| 24 |
-
|
| 25 |
-
```bash
|
| 26 |
-
# For macOS
|
| 27 |
-
brew install ollama
|
| 28 |
-
|
| 29 |
-
# For Linux
|
| 30 |
-
curl -fsSL https://ollama.ai/install.sh | sh
|
| 31 |
-
|
| 32 |
-
# Verify installation
|
| 33 |
-
ollama --version
|
| 34 |
-
|
| 35 |
-
# Windows
|
| 36 |
-
You can download from web https://ollama.com/
|
| 37 |
-
```
|
| 38 |
-
# Clone and Setup the Project
|
| 39 |
-
## Clone the repository
|
| 40 |
-
```
|
| 41 |
-
git clone https://github.com/Komal-99/cyfuture_bot.git
|
| 42 |
-
```
|
| 43 |
-
|
| 44 |
-
## Navigate to the project directory
|
| 45 |
-
```
|
| 46 |
-
cd cyfuture_bot
|
| 47 |
-
```
|
| 48 |
-
|
| 49 |
-
## Install dependencies
|
| 50 |
-
```
|
| 51 |
-
pip install -r requirements.txt # For Python projects
|
| 52 |
-
yarn install # For JavaScript projects
|
| 53 |
-
```
|
| 54 |
-
|
| 55 |
-
π Usage
|
| 56 |
-
Start the Project
|
| 57 |
-
Run the ```start.sh``` script to set up and launch the application:
|
| 58 |
-
```
|
| 59 |
-
chmod +x start.sh
|
| 60 |
-
./start.sh
|
| 61 |
-
|
| 62 |
-
```
|
| 63 |
-
This script:
|
| 64 |
-
|
| 65 |
-
Sets environment variables for optimization
|
| 66 |
-
|
| 67 |
-
Starts Ollama in the background
|
| 68 |
-
|
| 69 |
-
Pulls required models (deepseek-r1:7b, nomic-embed-text)
|
| 70 |
-
|
| 71 |
-
Waits for Ollama to initialize
|
| 72 |
-
|
| 73 |
-
### Launches the FastAPI server on http://127.0.0.1:7860
|
| 74 |
-
### Streamlit Application - http://127.0.0.1:8501
|
| 75 |
-
|
| 76 |
-
## API Endpoints
|
| 77 |
-
Upload Dataset
|
| 78 |
-
```
|
| 79 |
-
POST /upload_dataset/ #Upload an Excel dataset to be used for evaluation.
|
| 80 |
-
```
|
| 81 |
-
Run Evaluation
|
| 82 |
-
```
|
| 83 |
-
POST /run_evaluation/ #Evaluate the model's performance using Opik.
|
| 84 |
-
|
| 85 |
-
```
|
| 86 |
-
Query AI Assistant
|
| 87 |
-
```
|
| 88 |
-
GET /query/?input_text=your_question # Ask the assistant a question. The model retrieves relevant information and generates an answer based on indexed documents.
|
| 89 |
-
|
| 90 |
-
```
|
| 91 |
-
π Folder Structure
|
| 92 |
-
|
| 93 |
-
```
|
| 94 |
-
.
|
| 95 |
-
βββ AI_Agent/ # Datasource
|
| 96 |
-
βββ deepseek_cyfuture/ # DeepSeek Vector db
|
| 97 |
-
βββ .env # Environment variables
|
| 98 |
-
βββ .gitignore # Files to ignore in Git
|
| 99 |
-
βββ dataset.xlsx # Sample dataset file
|
| 100 |
-
βββ Dockerfile # Docker configuration
|
| 101 |
-
βββ requirements.txt # Dependencies (Python projects)
|
| 102 |
-
βββ start.sh # Startup script
|
| 103 |
-
βββ app.py # Main application file
|
| 104 |
-
βββ README.md # Project documentation
|
| 105 |
-
|
| 106 |
-
```
|
| 107 |
-
π€ Contributing
|
| 108 |
-
Contributions are welcome! Please follow these steps:
|
| 109 |
-
|
| 110 |
-
Fork the repository
|
| 111 |
-
|
| 112 |
-
Create a new branch (git checkout -b feature-branch)
|
| 113 |
-
|
| 114 |
-
Commit your changes (git commit -m 'Add new feature')
|
| 115 |
-
|
| 116 |
-
Push to the branch (git push origin feature-branch)
|
| 117 |
-
|
| 118 |
-
Create a pull request
|
| 119 |
-
|
| 120 |
-
π License
|
| 121 |
-
This project is licensed under the MIT License - see the LICENSE file for details.
|
| 122 |
-
|
| 123 |
-
π¬ Contact
|
| 124 |
-
For questions or issues, reach out:
|
| 125 |
-
|
| 126 |
-
GitHub: https://github.com/Komal-99
|
| 127 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|