Enhanced code and added git support

This commit is contained in:
Saifeddine ALOUI 2023-08-27 21:52:26 +02:00
parent 7feea6727e
commit fe893305c7
3 changed files with 13 additions and 1 deletions

@ -1052,6 +1052,7 @@ class APScript(StateMachine):
else:
ASCIIColors.error("Pytorch installed successfully!!")
def add_file(self, path, callback=None):
if callback is not None:
callback("File added successfully",MSG_TYPE.MSG_TYPE_INFO)

@ -7,6 +7,17 @@ import re
import subprocess
import gc
def git_pull(folder_path):
try:
# Change the current working directory to the desired folder
subprocess.run(["git", "checkout", folder_path], check=True, cwd=folder_path)
# Run 'git pull' in the specified folder
subprocess.run(["git", "pull"], check=True, cwd=folder_path)
print("Git pull successful in", folder_path)
except subprocess.CalledProcessError as e:
print("Error occurred while executing Git pull:", e)
# Handle any specific error handling here if required
class AdvancedGarbageCollector:
@staticmethod
def hardCollect(obj):

@ -26,7 +26,7 @@ def get_all_files(path):
setuptools.setup(
name="lollms",
version="4.5.1",
version="4.5.3",
author="Saifeddine ALOUI",
author_email="aloui.saifeddine@gmail.com",
description="A python library for AI personality definition",