Spaces:
Sleeping
Sleeping
metadata
title: Epigen WhatsApp Webhook
emoji: 🧬
colorFrom: green
colorTo: blue
sdk: docker
sdk_version: 3.9
app_file: app.py
pinned: false
Epigen WhatsApp Webhook
A webhook server for the Epigen WhatsApp integration. This service processes incoming WhatsApp messages using Google's Gemini AI model and responds with information about Epigen products and services.
Features
- Processes incoming WhatsApp messages via Green API
- Generates AI responses using Google's Gemini model
- Maintains conversation history for personalized interactions
- Provides health check and monitoring endpoints
Technical Stack
- Flask: Web framework for handling HTTP requests
- Uvicorn: ASGI server for running the Flask application
- Google Generative AI: AI model for generating responses
- Green API: WhatsApp integration provider
Deployment
This application is designed to be deployed as a Docker container and is compatible with:
- Hugging Face Spaces
- AWS Elastic Beanstalk
- Google Cloud Run
- Any Docker-compatible cloud platform
Local Development
- Clone the repository
- Create a
.envfile with the required API keys - Install dependencies:
pip install -r requirements.txt - Run the application:
python app.py
Environment Variables
GREEN_API_ID: Your Green API instance IDGREEN_API_TOKEN: Your Green API API tokenGOOGLE_API_KEY: Your Google API key for Gemini accessPORT: The port to run the server on (default: 7860)
API Endpoints
GET /: Home page showing server statusGET /health: Health check endpointGET/POST /webhook: Main webhook endpoint for WhatsApp integration