Spaces:
Runtime error
Runtime error
import subprocess | |
import sys | |
def install(package): | |
subprocess.check_call([sys.executable, "-m", "pip", "install", package]) | |
def setup_environment(): | |
print("Installing required packages...") | |
install('git+https://github.com/unslothai/unsloth.git#egg=unsloth[colab-new]') | |
install('--no-deps xformers') | |
install('trl<0.9.0') | |
install('peft') | |
install('accelerate') | |
install('bitsandbytes') | |
print("Packages installed successfully.") | |
if __name__ == "__main__": | |
setup_environment() |