Download app.py from salmgq/S1AI: direct link, hf CLI and curl.
- Browser
- Download file 537 Bytes
-
https://huggingface.co/spaces/salmgq/S1AI/resolve/main/app.py
- Command line
-
hf download hf://spaces/salmgq/S1AI/app.py
-
curl -L -o app.py https://huggingface.co/spaces/salmgq/S1AI/resolve/main/app.py
537 Bytes
| from git import Repo | |
| import os | |
| # Define the app directory | |
| appdir = os.environ.get("APP_DIR", "/home/user/app/lafire") | |
| # Create the directory if it doesn't exist | |
| if not os.path.exists(appdir): | |
| os.makedirs(appdir) | |
| git_token = os.environ.get("GIT_TOKEN") | |
| git_user = os.environ.get("GIT_USER") | |
| git_dir = os.environ.get("GIT_DIR") | |
| repo = "https://"+git_user+":"+git_token+"@github.com/"+git_user+"/"+git_dir | |
| filed = Repo.clone_from(repo, appdir, branch="main") | |
| from lafire.util.main import * | |
| if __name__ == '__main__': | |
| main() |