edouardlgp's picture
Update README.md
a7d834d verified

A newer version of the Gradio SDK is available: 5.29.0

Upgrade
metadata
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 and run in a shell: ollama serve

  2. Pull at least one model, for instance phi3 3.8b, with ollama pull phi3 a 2.2Gb model that run well on regular consumer hardware or Mistral-Nemo model, a slightly bigger one with ollama pull mistral-nemo

  3. Install Visual Studio Code and make sure to install the last stable version of python language

  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 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!