rwgertdthdht commited on
Commit
bbc013f
·
verified ·
1 Parent(s): 407831b

Upload Space app files

Browse files
Files changed (1) hide show
  1. DEPLOY_TO_HUGGINGFACE.md +31 -0
DEPLOY_TO_HUGGINGFACE.md ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Deploy to Hugging Face Spaces
2
+
3
+ ## Browser Upload
4
+
5
+ 1. Create a new Hugging Face Space.
6
+ 2. Choose `Gradio` as the SDK.
7
+ 3. Upload all files from this `huggingface_space` folder.
8
+ 4. Keep `fine_tuned_hatebert_model` in the Space root directory.
9
+ 5. Wait for the Space to build and start.
10
+
11
+ ## Git Upload
12
+
13
+ 1. Install Git LFS.
14
+ 2. Create a new Hugging Face Space.
15
+ 3. Clone the Space repository.
16
+ 4. Copy all files from this `huggingface_space` folder into the cloned repository.
17
+ 5. Run:
18
+
19
+ ```bash
20
+ git lfs install
21
+ git add .
22
+ git commit -m "Add HateBERT moderation prototype"
23
+ git push
24
+ ```
25
+
26
+ ## Notes
27
+
28
+ - `model.safetensors` is large and should be uploaded with Git LFS.
29
+ - The model is loaded from the local `fine_tuned_hatebert_model` folder.
30
+ - If the Space build fails because of memory, switch the Space hardware to a larger CPU instance.
31
+