fahrulputra40 commited on
Commit
168a9d1
Β·
1 Parent(s): 7a6df28

init project

Browse files
Files changed (34) hide show
  1. .gitignore +25 -29
  2. DockerFile +23 -0
  3. Space.yaml +1 -0
  4. backend/app.py +9 -0
  5. .editorconfig β†’ frontend/.editorconfig +0 -0
  6. .gitattributes β†’ frontend/.gitattributes +0 -0
  7. .prettierrc.json β†’ frontend/.prettierrc.json +0 -0
  8. env.d.ts β†’ frontend/env.d.ts +0 -0
  9. eslint.config.ts β†’ frontend/eslint.config.ts +0 -0
  10. index.html β†’ frontend/index.html +0 -0
  11. package.json β†’ frontend/package.json +0 -0
  12. {public β†’ frontend/public}/favicon.ico +0 -0
  13. {src β†’ frontend/src}/App.vue +0 -0
  14. {src β†’ frontend/src}/assets/base.css +0 -0
  15. {src β†’ frontend/src}/assets/logo.svg +0 -0
  16. {src β†’ frontend/src}/assets/main.css +0 -0
  17. {src β†’ frontend/src}/components/HelloWorld.vue +0 -0
  18. {src β†’ frontend/src}/components/TheWelcome.vue +0 -0
  19. {src β†’ frontend/src}/components/WelcomeItem.vue +0 -0
  20. {src β†’ frontend/src}/components/icons/IconCommunity.vue +0 -0
  21. {src β†’ frontend/src}/components/icons/IconDocumentation.vue +0 -0
  22. {src β†’ frontend/src}/components/icons/IconEcosystem.vue +0 -0
  23. {src β†’ frontend/src}/components/icons/IconSupport.vue +0 -0
  24. {src β†’ frontend/src}/components/icons/IconTooling.vue +0 -0
  25. {src β†’ frontend/src}/main.ts +0 -0
  26. {src β†’ frontend/src}/router/index.ts +0 -0
  27. {src β†’ frontend/src}/stores/counter.ts +0 -0
  28. {src β†’ frontend/src}/views/AboutView.vue +0 -0
  29. {src β†’ frontend/src}/views/HomeView.vue +0 -0
  30. tsconfig.app.json β†’ frontend/tsconfig.app.json +0 -0
  31. tsconfig.json β†’ frontend/tsconfig.json +0 -0
  32. tsconfig.node.json β†’ frontend/tsconfig.node.json +0 -0
  33. vite.config.ts β†’ frontend/vite.config.ts +0 -0
  34. requirements.txt +4 -0
.gitignore CHANGED
@@ -1,30 +1,26 @@
1
  # Logs
2
- logs
3
- *.log
4
- npm-debug.log*
5
- yarn-debug.log*
6
- yarn-error.log*
7
- pnpm-debug.log*
8
- lerna-debug.log*
9
-
10
- node_modules
11
- .DS_Store
12
- dist
13
- dist-ssr
14
- coverage
15
- *.local
16
-
17
- /cypress/videos/
18
- /cypress/screenshots/
19
-
20
- # Editor directories and files
21
- .vscode/*
22
- !.vscode/extensions.json
23
- .idea
24
- *.suo
25
- *.ntvs*
26
- *.njsproj
27
- *.sln
28
- *.sw?
29
-
30
- *.tsbuildinfo
 
1
  # Logs
2
+ FE/logs
3
+ FE/*.log
4
+ FE/npm-debug.log*
5
+ FE/yarn-debug.log*
6
+ FE/yarn-error.log*
7
+ FE/pnpm-debug.log*
8
+ FE/lerna-debug.log*
9
+ FE/node_modules
10
+ FE/.DS_Store
11
+ FE/dist
12
+ FE/dist-ssr
13
+ FE/coverage
14
+ FE/*.local
15
+ FE/cypress/videos/
16
+ FE/cypress/screenshots/
17
+ FE/# Editor directories and files
18
+ FE/.vscode/*
19
+ FE/!.vscode/extensions.json
20
+ FE/.idea
21
+ FE/*.suo
22
+ FE/*.ntvs*
23
+ FE/*.njsproj
24
+ FE/*.sln
25
+ FE/*.sw?
26
+ FE/*.tsbuildinfo
 
 
 
 
DockerFile ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM node:18-bullseye as frontend
2
+
3
+ WORKDIR /app/frontend
4
+ COPY frontend/ .
5
+ RUN npm install && npm run build
6
+
7
+ # === Backend ===
8
+ FROM python:3.10-slim
9
+ WORKDIR /app
10
+
11
+ # Install dependencies
12
+ COPY requirements.txt .
13
+ RUN pip install --no-cache-dir -r requirements.txt
14
+
15
+ # Copy Flask backend and Vue build
16
+ COPY backend/ ./backend/
17
+ COPY --from=frontend /app/frontend/dist ./frontend
18
+
19
+ # Set Flask environment
20
+ ENV FLASK_APP=backend/app.py
21
+ ENV FLASK_RUN_PORT=7860
22
+
23
+ CMD ["flask", "run", "--host=0.0.0.0"]
Space.yaml ADDED
@@ -0,0 +1 @@
 
 
1
+ sdk: docker
backend/app.py ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ from flask import Flask, request, jsonify, send_from_directory
2
+ import io
3
+ import os
4
+
5
+ app = Flask(__name__, static_folder='../frontend', static_url_path='')
6
+
7
+ @app.route("/")
8
+ def index():
9
+ return send_from_directory(app.static_folder, "index.html")
.editorconfig β†’ frontend/.editorconfig RENAMED
File without changes
.gitattributes β†’ frontend/.gitattributes RENAMED
File without changes
.prettierrc.json β†’ frontend/.prettierrc.json RENAMED
File without changes
env.d.ts β†’ frontend/env.d.ts RENAMED
File without changes
eslint.config.ts β†’ frontend/eslint.config.ts RENAMED
File without changes
index.html β†’ frontend/index.html RENAMED
File without changes
package.json β†’ frontend/package.json RENAMED
File without changes
{public β†’ frontend/public}/favicon.ico RENAMED
File without changes
{src β†’ frontend/src}/App.vue RENAMED
File without changes
{src β†’ frontend/src}/assets/base.css RENAMED
File without changes
{src β†’ frontend/src}/assets/logo.svg RENAMED
File without changes
{src β†’ frontend/src}/assets/main.css RENAMED
File without changes
{src β†’ frontend/src}/components/HelloWorld.vue RENAMED
File without changes
{src β†’ frontend/src}/components/TheWelcome.vue RENAMED
File without changes
{src β†’ frontend/src}/components/WelcomeItem.vue RENAMED
File without changes
{src β†’ frontend/src}/components/icons/IconCommunity.vue RENAMED
File without changes
{src β†’ frontend/src}/components/icons/IconDocumentation.vue RENAMED
File without changes
{src β†’ frontend/src}/components/icons/IconEcosystem.vue RENAMED
File without changes
{src β†’ frontend/src}/components/icons/IconSupport.vue RENAMED
File without changes
{src β†’ frontend/src}/components/icons/IconTooling.vue RENAMED
File without changes
{src β†’ frontend/src}/main.ts RENAMED
File without changes
{src β†’ frontend/src}/router/index.ts RENAMED
File without changes
{src β†’ frontend/src}/stores/counter.ts RENAMED
File without changes
{src β†’ frontend/src}/views/AboutView.vue RENAMED
File without changes
{src β†’ frontend/src}/views/HomeView.vue RENAMED
File without changes
tsconfig.app.json β†’ frontend/tsconfig.app.json RENAMED
File without changes
tsconfig.json β†’ frontend/tsconfig.json RENAMED
File without changes
tsconfig.node.json β†’ frontend/tsconfig.node.json RENAMED
File without changes
vite.config.ts β†’ frontend/vite.config.ts RENAMED
File without changes
requirements.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ flask
2
+ tensorflow
3
+ numpy
4
+ pillow