Spaces:
Build error
Build error
| # media_handler.py | |
| from abc import ABC, abstractmethod | |
| import logging | |
| from app.services.download_media import download_whatsapp_media | |
| logger = logging.getLogger(__name__) | |
| class MediaHandler(ABC): | |
| async def download(self, media_id: str, access_token: str, file_path: str) -> str: | |
| pass | |
| class WhatsAppMediaHandler(MediaHandler): | |
| async def download(self, media_id: str, access_token: str, file_path: str) -> str: | |
| return await download_whatsapp_media(media_id, access_token, file_path) |