HugoDzz commited on
Commit
6c6093b
·
1 Parent(s): 2dfbdff

feat: add application file

Browse files
Files changed (5) hide show
  1. .gitattributes +1 -0
  2. Dockerfile +14 -0
  3. README.md +5 -5
  4. app.py +17 -0
  5. spritefusion +3 -0
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* 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
 
 
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
36
+ spritefusion filter=lfs diff=lfs merge=lfs -text
Dockerfile ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
2
+ # you will also find guides on how best to write your Dockerfile
3
+
4
+ FROM python:3.9
5
+
6
+ RUN useradd -m -u 1000 user
7
+ USER user
8
+ ENV PATH="/home/user/.local/bin:$PATH"
9
+
10
+ WORKDIR /app
11
+
12
+ COPY --chown=user . /app
13
+
14
+ CMD ["python", "app.py"]
README.md CHANGED
@@ -1,11 +1,11 @@
1
  ---
2
  title: Tilemap Editor
3
- emoji: 🚀
4
- colorFrom: gray
5
- colorTo: green
6
  sdk: docker
7
- pinned: false
8
- short_description: 'Built with SvelteKit and EXE: https://github.com/Hugo-Dz/exe'
9
  ---
10
 
11
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
  title: Tilemap Editor
3
+ emoji: 💿
4
+ colorFrom: orange
5
+ colorTo: purple
6
  sdk: docker
7
+ pinned: true
8
+ short_description: "Built with SvelteKit and EXE: https://github.com/Hugo-Dz/exe"
9
  ---
10
 
11
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
app.py ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import subprocess
2
+ import sys
3
+ import os
4
+
5
+ if __name__ == "__main__":
6
+ os.chmod("./spritefusion", 0o755)
7
+
8
+ try:
9
+ result = subprocess.run(
10
+ ["./spritefusion"], check=True, capture_output=False)
11
+ sys.exit(result.returncode)
12
+ except subprocess.CalledProcessError as e:
13
+ print(f"Binary execution failed with return code {e.returncode}")
14
+ sys.exit(e.returncode)
15
+ except Exception as e:
16
+ print(f"Error executing binary: {e}")
17
+ sys.exit(1)
spritefusion ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:56da7943dfe6b189f7ccc6a5a05e7f4b3e9a7937e88eb0c3a956ed2a605a8901
3
+ size 47874720