tarujain8's picture
Update README.md
2458e9b verified
|
Raw
History Blame Contribute Delete
3.52 kB
---
title: Velra Intelligent Dating
emoji: πŸ’–
colorFrom: pink
colorTo: purple
sdk: docker
app_port: 7860
---
# πŸ’– Velra – AI Relationship Co-Pilot
Velra is an elite AI-powered psychological profiler for modern dating. It analyzes text conversations and chat screenshots, predicts emotional compatibility, detects contradictions, and provides actionable relationship advice without using generic therapy terminology.
---
## πŸš€ Features
- πŸ’¬ **Chat + Screenshot Analysis:** Upload raw text or screenshots (powered by OCR)
- 🧠 **Elite Emotional Intelligence:** Extracts true intent, power dynamics, and emotional asymmetry.
- ⚠️ **Risk & Contradiction Detection:** Calls out discrepancies between what people say and what they do.
- 🎯 **Perspective-Aware Strategy:** Adjusts advice based on exactly what *you* want (casual, commitment, detachment).
- πŸ’˜ **Actionable Replies:** Generates exactly calibrated text messages to send.
- πŸ€– **Multi-Agent System:** Powered by specialized AI agents for Analysis, Psychology, and Strategy.
---
## πŸ“‚ Project Structure
```text
velra/
β”‚
β”œβ”€β”€ frontend/
β”‚ β”œβ”€β”€ app.py # Main Streamlit UI entry point
β”‚ β”œβ”€β”€ shared.py # Shared UI components and logic
β”‚ └── pages/
β”‚ └── results.py # Result visualization page
β”‚
β”œβ”€β”€ backend/
β”‚ β”œβ”€β”€ app.py # FastAPI server handling agent orchestration
β”‚ β”œβ”€β”€ core/ # App configuration and logging
β”‚ β”œβ”€β”€ llm/ # LLM factory and provider setup
β”‚ β”œβ”€β”€ services/ # External services (OCR engine)
β”‚ β”œβ”€β”€ utils.py # JSON parsing and utilities
β”‚ └── agents/ # Core AI Multi-Agent Architecture
β”‚ β”œβ”€β”€ perspective.py # Fast perspective and role identification
β”‚ β”œβ”€β”€ analyst.py # Behavioral analysis and screenshot grounding
β”‚ β”œβ”€β”€ psychology.py # Attachment, intent alignment, and dynamics
β”‚ └── strategy.py # High-value, objective-based action plans
β”‚
β”œβ”€β”€ requirements.txt # Python dependencies
β”œβ”€β”€ .env # Environment variables (Keys & Providers)
└── README.md # Project documentation
```
---
## 🧠 Architecture Flow
`Frontend (Streamlit) β†’ Backend (FastAPI) β†’ OCR Engine (Tesseract) β†’ Agents (Perspective β†’ Analyst + Psychology β†’ Strategy) β†’ LLM Inference (AMD/OpenAI)`
---
## βš™οΈ Setup & Local Development
### 1. Create Environment
```bash
python -m venv velra_env
# Windows:
velra_env\Scripts\activate
# Mac/Linux:
source velra_env/bin/activate
```
### 2. Install Dependencies
```bash
pip install -r requirements.txt
```
### 3. Setup Environment Variables
Create a `.env` file in the root directory:
```env
LLM_PROVIDER=openai
MODEL_NAME=gpt-4o-mini
OPENAI_API_KEY=your_api_key_here
```
### 4. Run the Backend (FastAPI)
```bash
uvicorn backend.app:app --reload
```
### 5. Run the Frontend (Streamlit)
Open a new terminal window, activate the environment, and run:
```bash
streamlit run frontend/app.py
```
---
*Note: If deploying to Hugging Face Spaces, the platform will automatically read the `app_file` parameter in the header and launch the Streamlit frontend. The backend FastAPI logic is currently separated; for a pure single-container HF Space, ensure both services run or migrate the backend logic into the Streamlit lifecycle if needed.*