David Pomerenke commited on
Commit
6baf3ad
·
1 Parent(s): 43057f8

Upload script

Browse files
Files changed (2) hide show
  1. frontend/package.json +2 -1
  2. frontend/upload.py +20 -0
frontend/package.json CHANGED
@@ -20,7 +20,8 @@
20
  "start": "react-scripts start",
21
  "build": "react-scripts build",
22
  "test": "react-scripts test",
23
- "eject": "react-scripts eject"
 
24
  },
25
  "eslintConfig": {
26
  "extends": [
 
20
  "start": "react-scripts start",
21
  "build": "react-scripts build",
22
  "test": "react-scripts test",
23
+ "eject": "react-scripts eject",
24
+ "deploy": "uv run upload.py"
25
  },
26
  "eslintConfig": {
27
  "extends": [
frontend/upload.py ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # /// script
2
+ # dependencies = [
3
+ # "huggingface_hub",
4
+ # "python-dotenv",
5
+ # ]
6
+ # ///
7
+
8
+ from huggingface_hub import upload_folder
9
+ import os
10
+ from dotenv import load_dotenv
11
+
12
+ load_dotenv()
13
+
14
+ upload_folder(
15
+ folder_path="build",
16
+ path_in_repo="/",
17
+ repo_id="datenlabor-bmz/ai-language-monitor",
18
+ repo_type="space",
19
+ token=os.getenv("HUGGINGFACE_ACCESS_TOKEN"),
20
+ )