Spaces:
Sleeping
Sleeping
| title: Offline Survey Analysis | |
| emoji: 💬 | |
| colorFrom: yellow | |
| colorTo: blue | |
| sdk: gradio | |
| sdk_version: 5.0.1 | |
| app_file: app.py | |
| pinned: false | |
| license: apache-2.0 | |
| short_description: Analyse sensitive survey data in offline mode | |
| This space build from https://huggingface.co/spaces/VIDraft/EveryRAG and provide adjustements for this work offline with ollama when __working with sensitive data__ that can come with data protection concerns. | |
| The app now works completely offline (after downloading the model) wich means that you do not need to share any data on the cloud... | |
| ## Requirements: | |
| 1. Install [Ollama](https://ollama.com/download) and run in a shell: `ollama serve` | |
| 2. Pull at least one model, for instance [phi3 3.8b](https://ollama.com/library/phi3), with `ollama pull phi3` a 2.2Gb model that run well on regular consumer hardware or [Mistral-Nemo model](https://ollama.com/library/mistral-nemo), a slightly bigger one with `ollama pull mistral-nemo` | |
| 3. Install [Visual Studio Code](https://code.visualstudio.com/) and make sure to install the last [stable version of python language](https://www.python.org/downloads/) | |
| 4. Clone this repo in visual studio, | |
| 5. Create a virtual environment in Python development. This is essential for managing dependencies, avoiding conflicts, and ensuring reproducibility. It allows you to isolate project-specific libraries and versions, preventing interference with other projects or the global Python installation. This isolation helps maintain a clean development environment, simplifies project setup for collaborators, and enhances security by reducing the risk of introducing vulnerabilities. Overall, virtual environments provide a consistent and organized way to manage your Python projects effectively. | |
| - Open your terminal in VS code | |
| - Run the following command to create a virtual environment, here called **`.venv`**: `python -m venv .venv` | |
| - Then, activate the virtual environment - on windows with `.\.venv\Scripts\activate` | |
| - Then install all require Python Modules with `pip install -r requirements.txt` | |
| ## How to Use: | |
| 1. Run the app.py script > `python app.py` | |
| 2. Open [your localhost ](http://127.0.0.1:7860) and upload your survey data file (text, code, CSV, or Parquet) | |
| 3. The app will automatically analyze the file structure | |
| 4. __Et voilà!__ Ask questions about your file in natural language. The model can help you to write quickly any analysis notebook! | |