Spaces:
No application file
No application file
| import os | |
| import subprocess | |
| import sys | |
| def run_command(cmd, cwd=None): | |
| try: | |
| result = subprocess.run(cmd, shell=True, cwd=cwd, capture_output=True, text=True, check=True) | |
| print(result.stdout) | |
| return True | |
| except subprocess.CalledProcessError as e: | |
| print(f"Error: {e.stderr}") | |
| return False | |
| print("Clonando Hermes...") | |
| if not run_command("git clone https://github.com/NousResearch/hermes-agent.git"): | |
| print("Fallo al clonar. ¿Git instalado?") | |
| sys.exit(1) | |
| os.chdir("hermes-agent") | |
| print("Instalando dependencias...") | |
| if not run_command("pip install -e ."): | |
| print("Fallo en instalación pip") | |
| sys.exit(1) | |
| print("\nHermes instalado.") | |
| print("Ejecuta: hermes") |