kiran chauhan commited on
Commit
2f77fa0
β€’
1 Parent(s): 6ba151e

Upload 5 files

Browse files
Files changed (5) hide show
  1. .gitattributes +35 -35
  2. LICENSE.md +44 -0
  3. README.md +14 -13
  4. app.py +30 -0
  5. requirements.txt +1 -0
.gitattributes CHANGED
@@ -1,35 +1,35 @@
1
- *.7z filter=lfs diff=lfs merge=lfs -text
2
- *.arrow filter=lfs diff=lfs merge=lfs -text
3
- *.bin filter=lfs diff=lfs merge=lfs -text
4
- *.bz2 filter=lfs diff=lfs merge=lfs -text
5
- *.ckpt filter=lfs diff=lfs merge=lfs -text
6
- *.ftz filter=lfs diff=lfs merge=lfs -text
7
- *.gz filter=lfs diff=lfs merge=lfs -text
8
- *.h5 filter=lfs diff=lfs merge=lfs -text
9
- *.joblib filter=lfs diff=lfs merge=lfs -text
10
- *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
- *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
- *.model filter=lfs diff=lfs merge=lfs -text
13
- *.msgpack filter=lfs diff=lfs merge=lfs -text
14
- *.npy filter=lfs diff=lfs merge=lfs -text
15
- *.npz filter=lfs diff=lfs merge=lfs -text
16
- *.onnx filter=lfs diff=lfs merge=lfs -text
17
- *.ot filter=lfs diff=lfs merge=lfs -text
18
- *.parquet filter=lfs diff=lfs merge=lfs -text
19
- *.pb filter=lfs diff=lfs merge=lfs -text
20
- *.pickle filter=lfs diff=lfs merge=lfs -text
21
- *.pkl filter=lfs diff=lfs merge=lfs -text
22
- *.pt filter=lfs diff=lfs merge=lfs -text
23
- *.pth filter=lfs diff=lfs merge=lfs -text
24
- *.rar filter=lfs diff=lfs merge=lfs -text
25
- *.safetensors filter=lfs diff=lfs merge=lfs -text
26
- saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
- *.tar.* filter=lfs diff=lfs merge=lfs -text
28
- *.tar filter=lfs diff=lfs merge=lfs -text
29
- *.tflite filter=lfs diff=lfs merge=lfs -text
30
- *.tgz filter=lfs diff=lfs merge=lfs -text
31
- *.wasm filter=lfs diff=lfs merge=lfs -text
32
- *.xz filter=lfs diff=lfs merge=lfs -text
33
- *.zip filter=lfs diff=lfs merge=lfs -text
34
- *.zst filter=lfs diff=lfs merge=lfs -text
35
- *tfevents* filter=lfs diff=lfs merge=lfs -text
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
LICENSE.md ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Nick088's Non-Commercial License (NNC)
2
+
3
+ ## 1. Definitions
4
+
5
+ - "Software" refers to the content present within this repository including code, text, graphics, sounds, images, and other files.
6
+ - "You" refers to the individual or entity that wishes to use the Software.
7
+ - "Nick088" refers to the original creator of the Software.
8
+ - "Fork" refers to the action of creating a personal copy of another user's repository.
9
+
10
+ ## 2. Grant of Rights
11
+
12
+ Subject to the terms of this license, Nick088 hereby grants You a worldwide, royalty-free, non-exclusive, perpetual license to use the Software for personal and non-commercial purposes. This includes the rights to use, copy, modify, merge, publish, and distribute the Software for non-commercial purposes.
13
+
14
+ ## 3. Redistribution
15
+
16
+ You may not distribute or sell the Software, or any derivative works based on the Software, unless you have been specifically granted permission by Nick088. Any permitted redistribution must also be under the terms of this license. Unauthorized distribution is strictly prohibited and will result in the termination of this license.
17
+
18
+ ## 4. Commercial Use
19
+
20
+ The use of the Software for commercial purposes, including any form of paid software support and , is strictly forbidden without the explicit written approval of Nick088. This applies to both profit-driven businesses and non-profit organizations that handle monetary transactions.
21
+
22
+ Nick088 may agree to a predetermined or subsequently decided percentage of the profits. Nick088 maintains an upper hand in all such negotiations and reserves any rights, including the right to terminate the contract at any time.
23
+
24
+ Any unauthorized commercial use is strictly prohibited and will result to an immediate termination of this license. In the event of a breach of these terms, Nick088 reserves the right to pursue legal remedies. This may result in litigation, and the offending party may be held liable for any damages incurred. Please be aware that non-compliance with these terms is a serious matter and could have significant legal consequences.
25
+
26
+ ## 5. Forking & Personal Use
27
+
28
+ You are free to fork and modify the Software for your own personal use. You may not distribute, or create derivative works from your modifications unless granted permission by Nick088. All modifications must also be under the terms of this license.
29
+
30
+ ## 6. Liability
31
+
32
+ Nick088 provides the Software "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and non-infringement. In no event shall Nick088 be liable for any claim, damages, or other liability, whether in an action of contract, tort, or otherwise, arising from, out of, or in connection with the Software or the use or other dealings in the Software. You agree to use the Software at your own risk.
33
+
34
+ ## 7. Governing Law
35
+
36
+ This license is governed by the laws of the jurisdiction in which Nick088 resides. Any disputes related to this license will be resolved in the courts of that jurisdiction.
37
+
38
+ ## 8. FaceFusion's License
39
+
40
+ This repository contains .ipynb files that utilize the FaceFusion program. The program license is:
41
+
42
+ > MIT license
43
+ >
44
+ > Copyright (c) 2024 Henry Ruhs
README.md CHANGED
@@ -1,13 +1,14 @@
1
- ---
2
- title: FaceFusion
3
- emoji: πŸƒ
4
- colorFrom: red
5
- colorTo: green
6
- sdk: gradio
7
- sdk_version: 4.44.0
8
- app_file: app.py
9
- pinned: false
10
- license: other
11
- ---
12
-
13
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
1
+ ---
2
+ title: FaceFusion
3
+ emoji: πŸ‘¨β€πŸ¦°πŸ”€πŸ‘¨β€πŸ¦°
4
+ colorFrom: red
5
+ colorTo: yellow
6
+ sdk: gradio
7
+ sdk_version: 4.24.0
8
+ app_file: app.py
9
+ pinned: true
10
+ license: other
11
+ short_description: DeepFake AI Tool for Videos & Images
12
+ ---
13
+
14
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
app.py ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import subprocess
2
+ import os
3
+ import torch
4
+
5
+ if torch.cuda.is_available():
6
+ device="cuda"
7
+ print("Using GPU")
8
+ else:
9
+ device="cpu"
10
+ print("Using CPU")
11
+
12
+
13
+ # Clone the repository
14
+ subprocess.run(["git", "clone", "https://github.com/facefusion/facefusion", "--single-branch"], check=True)
15
+ # chande directory to face fusion to run ui
16
+ os.chdir("facefusion")
17
+
18
+
19
+ # installation
20
+ if device == "cuda":
21
+ subprocess.run(["python", "install.py", "--onnxruntime", "cuda", "--skip-conda"], check=True)
22
+ elif device == "cpu":
23
+ subprocess.run(["python", "install.py", "--onnxruntime", "default", "--skip-conda"], check=True)
24
+
25
+
26
+ # Run the ui
27
+ if device == "cuda":
28
+ subprocess.run(["python", "facefusion.py", "run", "--execution-providers", "cuda"], check=True)
29
+ elif device == "cpu":
30
+ subprocess.run(["python", "facefusion.py", "run", "--execution-providers", "cpu"], check=True)
requirements.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ torch