gladguy commited on
Commit
b57f223
Β·
1 Parent(s): 119408d

Add deployment instructions

Browse files
Files changed (1) hide show
  1. DEPLOY.md +109 -0
DEPLOY.md ADDED
@@ -0,0 +1,109 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # πŸš€ Quick Deployment Instructions
2
+
3
+ ## βœ… Repository Status
4
+
5
+ **SimpleHF is now synced with Hugging Face Space!**
6
+
7
+ Repository: https://huggingface.co/spaces/gladguy/SimpleProject
8
+ Branch: main
9
+ Latest commit: 119408d - "Add AnatomyBot - MBBS Anatomy Tutor with AI-powered learning features"
10
+
11
+ ## πŸ“€ Push to Hugging Face
12
+
13
+ Run this command to deploy:
14
+
15
+ ```bash
16
+ git push origin main
17
+ ```
18
+
19
+ If you need authentication, use your Hugging Face credentials:
20
+ - Username: `gladguy` (or your username)
21
+ - Password: Your Hugging Face access token (get from https://huggingface.co/settings/tokens)
22
+
23
+ ## πŸ”‘ Configure API Keys (CRITICAL!)
24
+
25
+ After pushing, you MUST add these secrets in your Space settings:
26
+
27
+ 1. Go to: https://huggingface.co/spaces/gladguy/SimpleProject/settings
28
+ 2. Scroll to **Repository secrets**
29
+ 3. Add:
30
+ - Name: `SERPAPI_KEY` β†’ Value: Your SERPAPI key
31
+ - Name: `HYPERBOLIC_API_KEY` β†’ Value: Your Hyperbolic key
32
+
33
+ ## ✨ What's Included
34
+
35
+ βœ… `app.py` - Main AnatomyBot application with:
36
+ - Anatomy-only question validation
37
+ - Google Images search via SERPAPI
38
+ - AI content generation via Hyperbolic (Llama 3.3 70B)
39
+ - Interactive Gradio interface
40
+
41
+ βœ… `requirements.txt` - All Python dependencies
42
+
43
+ βœ… `README.md` - Space description with Hugging Face configuration
44
+
45
+ βœ… `setup.py` - Helper script to configure API keys locally
46
+
47
+ βœ… `.gitignore` - Prevents committing .env and other sensitive files
48
+
49
+ ## 🎯 After Deployment
50
+
51
+ Your Space will be live at:
52
+ **https://huggingface.co/spaces/gladguy/SimpleProject**
53
+
54
+ Test with these questions:
55
+ - "Show me the Circle of Willis"
56
+ - "Brachial plexus anatomy"
57
+ - "Carpal bones arrangement"
58
+
59
+ ## πŸ“ Local Testing (Before Pushing)
60
+
61
+ To test locally first:
62
+
63
+ 1. Configure your API keys:
64
+ ```bash
65
+ python setup.py
66
+ # OR manually edit .env file
67
+ ```
68
+
69
+ 2. Run the app:
70
+ ```bash
71
+ python app.py
72
+ ```
73
+
74
+ 3. Open http://localhost:7860 in your browser
75
+
76
+ ## πŸ”§ Troubleshooting
77
+
78
+ **Issue: Authentication failed when pushing**
79
+ ```bash
80
+ # Use access token in URL
81
+ git remote set-url origin https://gladguy:YOUR_TOKEN@huggingface.co/spaces/gladguy/SimpleProject
82
+ git push origin main
83
+ ```
84
+
85
+ **Issue: Space shows error after deployment**
86
+ - Check that both API keys are set in Space secrets
87
+ - Check the build logs in the Space
88
+
89
+ ## πŸ“Š Files Ready to Deploy
90
+
91
+ ```
92
+ SimpleHF/
93
+ β”œβ”€β”€ .gitignore βœ… Committed
94
+ β”œβ”€β”€ README.md βœ… Committed (with HF config)
95
+ β”œβ”€β”€ app.py βœ… Committed
96
+ β”œβ”€β”€ requirements.txt βœ… Committed
97
+ β”œβ”€β”€ setup.py βœ… Committed
98
+ └── .env ❌ Not committed (contains secrets)
99
+ ```
100
+
101
+ ## πŸŽ‰ Ready to Deploy!
102
+
103
+ Everything is committed and ready. Just run:
104
+
105
+ ```bash
106
+ git push origin main
107
+ ```
108
+
109
+ Then configure your API keys in the Space settings!