KingZack commited on
Commit
9195cb9
·
1 Parent(s): 501669a

updating readme with better instructions

Browse files
Files changed (1) hide show
  1. README.md +46 -0
README.md CHANGED
@@ -10,3 +10,49 @@ pinned: false
10
  short_description: pushing-github-to-hf
11
  ---
12
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  short_description: pushing-github-to-hf
11
  ---
12
 
13
+ # Linking and Pushing Github Repo to Huggingface Space
14
+
15
+ ### Create HuggingFace Space.
16
+ * Do NOT clone the HuggingFace Space's repo locally.
17
+ * Just copy contents of its README.md file
18
+
19
+
20
+ ### Create a GitHub repo
21
+ * DO clone the GitHub repo locally
22
+
23
+ ### Edit your Github README.md file with the contents of your HF Space README.md file
24
+
25
+ ### Develop your app locally.
26
+ Must have:
27
+ * requirements.txt
28
+ * app.py
29
+ * README.md <-- MUST START WITH with HuggingFace formatting (the stuff between the two --- at the top))
30
+
31
+ ### Add, commit, and push to github
32
+ * Dont push any api keys...
33
+ * If using any api keys, add them to your HF_SPACE secrets via the huggingface space web site.
34
+
35
+ ### Linking Github to HF
36
+ Get URL of your huggingface space
37
+ ```
38
+ https://huggingface.co/spaces/HF_USERNAME/SPACE_NAME
39
+
40
+ https://huggingface.co/spaces/KingZack/pushing-github-to-hf
41
+
42
+ ```
43
+
44
+
45
+ ### Set Github remote to your HuggingFace space
46
+
47
+ ```bash
48
+ git remote add space https://huggingface.co/spaces/KingZack/pushing-github-to-hf
49
+ ```
50
+
51
+ ### Push what is in your Github to HuggingFace
52
+ ```bash
53
+ git push --force space main
54
+ ```
55
+
56
+ ### FIN :)
57
+ * Dont forget, everytime you push to github you also have to push to huggingface by doing:
58
+ ```git push --force space main```