CoolFace
Apppublic

emilevh/Thesis_chatbot_phase1_v1

sourceHugging Faceupdated 6mo agoView on Hugging Face
0likes
App README

πŸ€– Emma: HAPA Behavioral Change Bot (Intake Phase)

This repository hosts a prototype AI-driven intake coach developed for a Master’s Thesis in Biomedical/Behavioral Engineering. The bot, named Emma, is designed to conduct a structured health intake conversation based on the Health Action Process Approach (HAPA) framework.

🎯 Project Objective

The goal of this application is to automate the "Motivational Phase" of the HAPA model by gathering specific patient parameters. This data is used to build a dynamic User Profile (JSON), which serves as the foundation for personalized behavioral interventions.

Data Points Collected:

  • β€”Demographics: Name, Age, Gender, Income Level.
  • β€”Preferences: Exercise Duration and Intensity.
  • β€”Status: Current Fitness Level.

πŸ› οΈ Technical Architecture

This project utilizes a Dual-Agent Micro-service Architecture:

  1. 1.Conversational Layer: A Large Language Model (Llama-3.1-8B-Instruct) acting as "Emma," using a warm and professional system prompt to guide the user.
  2. 2.Extraction Layer: A hidden "Extractor Agent" that parses the conversation history in real-time to identify and structure user data into a standardized JSON schema.
  3. 3.Frontend: Developed with Streamlit for a lightweight, reactive user experience.
  4. 4.Backend: Hosted on Hugging Face Spaces using the Inference API for high-performance GPU processing.

πŸš€ How to Use (For Evaluators/Experts)

  1. 1.Start the Chat: Simply say "Hi" or "I'm ready to start."
  2. 2.Natural Conversation: Answer Emma's questions naturally. You do not need to provide information in any specific order.
  3. 3.Researcher Dashboard: Monitor the sidebar on the left. You will see the JSON User Profile update in real-time as Emma "learns" about the user.
  4. 4.Export: Once all fields are collected, an "Intake Complete" notification will appear, allowing you to download the structured data