Sign inSign up

cacarvuai/human-ai-collab

By cacarvuai

•Updated over 1 year ago

Provides evaluation support powered by advanced language models llama3.2:3b and mistral.

Image
Machine learning & AI
Data science
Databases & storage
0

1.1K

cacarvuai/human-ai-collab repository overview

⁠Human_AI_Collab

A Streamlit-based application for evaluating Human-AI collaboration in policing. This project uses survey data to generate insights through interactive dashboards and provides evaluation support powered by advanced language models llama3.2:3b and mistral.


⁠Features

  • Survey Responses Dashboard: Analyze survey data using charts, maps, and word clouds.
  • AI-Powered Evaluation: Gain insights from survey responses with advanced language models.
  • Streamlit App: Simple and user-friendly web interface.

⁠Quick Start

⁠Method 1: Using Docker
  1. Install Docker: Download Docker⁠.
  2. Login to Docker Hub:
   docker login
  1. Pull the Image:
   docker pull cacarvuai/human-ai-collab:latest
  1. Run the Container:
   docker run -p 8501:8501 --rm -it cacarvuai/human-ai-collab:latest
  1. Access the App:
    Open your browser and navigate to http://localhost:8501.

⁠Method 2: Running Locally
⁠Prerequisites
  • Python 3.11+
  • Virtual environment tools (venv or virtualenv)
⁠Steps
  1. Clone the Repository:
   git clone https://github.com/WSvanTienen/Human-AI-Collab
   cd Human-AI-Collab
  1. Set Up Virtual Environment:
   python -m venv .venv
   source .venv/bin/activate  # On Windows: .venv\\Scripts\\activate
  1. Install Dependencies:
   pip install -r requirements.txt
  1. Run the Application:
   streamlit run application.py
  1. Access the App:
    Open your browser and navigate to http://localhost:8501.

⁠Running with Dockerfile

To build and run the Docker image manually:

  1. Build the Docker Image:
   docker build -t human-ai-collab:latest .
  1. Run the Docker Container:
   docker run -p 8501:8501 human-ai-collab:latest
  1. Access the App:
    Open your browser and navigate to http://localhost:8501.

⁠Notes for Running Locally

⁠Activating the Virtual Environment on Windows

If PowerShell shows an error about the execution policy, run this command:

Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass

Then activate the environment:

.venv\\Scripts\\activate

⁠Dependencies

  • Streamlit: For creating interactive web apps.
  • Altair: For data visualization.
  • Folium: For interactive maps.
  • WordCloud: For generating word clouds.
  • SQLite3: For database storage and management.
  • Ollama: For advanced language model interactions.
⁠Ollama Models Used
  • llama3.2:3b: For generating embeddings and refining survey questions.
  • mistral: For evaluation insights based on survey responses.

⁠File Structure

  • application.py: Main application file.
  • Dockerfile: Docker configuration file for containerizing the app.
  • Evaluation_LLM.py: Provides evaluation support powered by language models.
  • images: Directory containing images used in the application.
  • main_survey.py: Handles survey logic and embedding generation.
  • README.md: Project documentation.
  • requirements.txt: List of Python dependencies.
  • responses.db: SQLite database for storing survey responses.
  • survey_final.json: JSON file containing the survey questions and configurations.
  • survey_results.db: SQLite database for storing survey results.
  • visuals_db_test.py: Generates the survey dashboard.

⁠Contributing

  1. Fork the repository.
  2. Create a feature branch:
    git checkout -b feature-name
    
  3. Commit your changes:
    git commit -m "Add new feature"
    
  4. Push to the branch:
    git push origin feature-name
    
  5. Open a Pull Request.

Tag summary

Content type

Image

Digest

sha256:0accc585b…

Size

1.8 GB

Last updated

over 1 year ago

docker pull cacarvuai/human-ai-collab