This package contains a Facebook Messenger bot that allows users to interact with the Skin AI service. Users can send a skin image and receive an mpox prediction directly in the chat.
- Handles Facebook Messenger webhook verification.
- Receives image attachments from users.
- Communicates with the
skin-aiAPI to get predictions. - Sends the prediction results back to the user as a text message.
-
Environment Variables: Create a
.envfile in the root of the project with the following content:VERIFY_TOKEN="YOUR_FACEBOOK_VERIFY_TOKEN" PAGE_ACCESS_TOKEN="YOUR_FACEBOOK_PAGE_ACCESS_TOKEN"
Replace the placeholder values with your actual tokens from your Facebook Developer App settings.
-
Dependencies: Ensure all project dependencies are installed by running
uv sync --all-packagesfrom the project root.
First, make sure the API service is running. Then, start the bot server:
uv run python bot/main.pyThe bot's webhook listener will be running at http://localhost:5555/webhook. You will need to use a tool like ngrok to expose this endpoint to Facebook.