| 11111 | return {"error": f"Errore confronto facciale: {e}"} |
| 11112 | |
| 11113 | def _human_bytes(self, size_bytes): |
| 11114 | try: |
| 11115 | size = int(size_bytes) |
| 11116 | except (TypeError, ValueError): |
| 11117 | return str(size_bytes) |
| 11118 | units = ["B", "KB", "MB", "GB", "TB"] |
| 11119 | value = float(size) |
| 11120 | for unit in units: |
| 11121 | if value < 1024 or unit == units[-1]: |
| 11122 | if unit == "B": |
| 11123 | return f"{int(value)} {unit}" |
| 11124 | return f"{value:.2f} {unit}" |
| 11125 | value /= 1024 |
| 11126 | |
| 11127 | def _google_maps_get_public(self, url, headers): |
| 11128 | try: |