Spaces:
Paused
Paused
| import os | |
| ENV = os.getenv("API_ENV", "space") | |
| API_ENDPOINTS_SPACE = { | |
| "ResNet50": { | |
| "base_url": "https://reco-team-reco-resnet-api.hf.space", | |
| "clear_pred": "/admin/clear-predictions", | |
| "clear_heatmap": "/admin/clear-heatmaps", | |
| "stats": "/admin/stats", | |
| "logs": "/admin/logs" | |
| }, | |
| "EfficientNetV2M": { | |
| "base_url": "https://reco-team-reco-efficientnet-api.hf.space", | |
| "clear_pred": "/admin/clear-predictions", | |
| "clear_heatmap": "/admin/clear-heatmaps", | |
| "stats": "/admin/stats", | |
| "logs": "/admin/logs" | |
| }, | |
| "SwinTransformer": { | |
| "base_url": "https://reco-team-reco-swintransformer-api.hf.space", | |
| "clear_pred": "/admin/clear-predictions", | |
| "clear_heatmap": "/admin/clear-heatmaps", | |
| "stats": "/admin/stats", | |
| "logs": "/admin/logs" | |
| }, | |
| "Orchestrateur": { | |
| "base_url": "https://reco-team-reco-orchestrator-api.hf.space", | |
| "clear_state": "/admin/reset-state", | |
| "stats": "/admin/stats", | |
| "logs": "/admin/logs" | |
| } | |
| } | |
| API_ENDPOINTS_LOCAL = { | |
| "ResNet50": { | |
| "base_url": "http://0.0.0.0:7862", | |
| "clear_pred": "/admin/clear-predictions", | |
| "clear_heatmap": "/admin/clear-heatmaps", | |
| "stats": "/admin/stats", | |
| "logs": "/admin/logs", | |
| }, | |
| "EfficientNetV2M": { | |
| "base_url": "http://0.0.0.0:7861", | |
| "clear_pred": "/admin/clear-predictions", | |
| "clear_heatmap": "/admin/clear-heatmaps", | |
| "stats": "/admin/stats", | |
| "logs": "/admin/logs", | |
| }, | |
| "SwinTransformer": { | |
| "base_url": "http://0.0.0.0:7863", | |
| "clear_pred": "/admin/clear-predictions", | |
| "clear_heatmap": "/admin/clear-heatmaps", | |
| "stats": "/admin/stats", | |
| "logs": "/admin/logs", | |
| }, | |
| "Orchestrateur": { | |
| "base_url": "http://0.0.0.0:7860", | |
| "clear_state": "/admin/reset-state", | |
| "stats": "/admin/stats", | |
| "logs": "/admin/logs", | |
| } | |
| } | |
| if ENV == "local": | |
| API_ENDPOINTS=API_ENDPOINTS_LOCAL | |
| else: | |
| API_ENDPOINTS=API_ENDPOINTS_SPACE |