DmitrMakeev commited on
Commit
8521994
1 Parent(s): 3364fab

Delete demo.ipynb

Browse files
Files changed (1) hide show
  1. demo.ipynb +0 -59
demo.ipynb DELETED
@@ -1,59 +0,0 @@
1
- {
2
- "cells": [
3
- {
4
- "cell_type": "code",
5
- "execution_count": null,
6
- "metadata": {
7
- "id": "PeEyOhUDHhzF"
8
- },
9
- "outputs": [],
10
- "source": [
11
- "import os\n",
12
- "import subprocess\n",
13
- "\n",
14
- "ROOT_DIR = \"/content\"\n",
15
- "REPO_URL = \"https://huggingface.co/spaces/Linaqruf/Animagine-XL\"\n",
16
- "REPO_DIR = os.path.join(ROOT_DIR, \"Animagine-XL\")\n",
17
- "\n",
18
- "def clone(url, dir, branch=None):\n",
19
- " subprocess.run([\"git\", \"clone\", url, dir], check=True)\n",
20
- " if branch:\n",
21
- " subprocess.run([\"git\", \"checkout\", branch], cwd=dir, check=True)\n",
22
- "\n",
23
- "def install_deps(dir):\n",
24
- " subprocess.run([\"pip\", \"install\", \"-r\", \"requirements.txt\"], cwd=dir, check=True)\n",
25
- "\n",
26
- "def main():\n",
27
- " if not os.path.exists(REPO_DIR):\n",
28
- " print(f\"Cloning Repository to {REPO_DIR}\")\n",
29
- " clone(REPO_URL, REPO_DIR)\n",
30
- " print(f\"Installing required python libraries\")\n",
31
- " install_deps(REPO_DIR)\n",
32
- " print(\"Done!\")\n",
33
- "\n",
34
- " os.chdir(REPO_DIR)\n",
35
- " !python app.py\n",
36
- "\n",
37
- "if __name__ == \"__main__\":\n",
38
- " main()\n"
39
- ]
40
- }
41
- ],
42
- "metadata": {
43
- "accelerator": "GPU",
44
- "colab": {
45
- "machine_shape": "hm",
46
- "provenance": [],
47
- "gpuType": "A100"
48
- },
49
- "kernelspec": {
50
- "display_name": "Python 3",
51
- "name": "python3"
52
- },
53
- "language_info": {
54
- "name": "python"
55
- }
56
- },
57
- "nbformat": 4,
58
- "nbformat_minor": 0
59
- }