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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# HuggingFace Spaces Deployment - Quick Fix
|
| 2 |
+
|
| 3 |
+
## Issue: Configuration Error
|
| 4 |
+
|
| 5 |
+
If you get "Missing configuration in README" error, use one of these:
|
| 6 |
+
|
| 7 |
+
### Option 1: Full Featured (Recommended)
|
| 8 |
+
Use `README_HF_SPACES.md` - includes all features and tags
|
| 9 |
+
|
| 10 |
+
```yaml
|
| 11 |
+
---
|
| 12 |
+
title: AI Writing Studio
|
| 13 |
+
emoji: ✍️
|
| 14 |
+
colorFrom: blue
|
| 15 |
+
colorTo: purple
|
| 16 |
+
sdk: gradio
|
| 17 |
+
sdk_version: "4.0.0" # ← Must be quoted!
|
| 18 |
+
app_file: app.py
|
| 19 |
+
pinned: false
|
| 20 |
+
license: mit
|
| 21 |
+
short_description: Production-grade AI writing assistant with real rubric scoring
|
| 22 |
+
tags:
|
| 23 |
+
- education
|
| 24 |
+
- writing
|
| 25 |
+
- nlp
|
| 26 |
+
- text-generation
|
| 27 |
+
- analysis
|
| 28 |
+
suggested_hardware: cpu-basic
|
| 29 |
+
suggested_storage: small
|
| 30 |
+
---
|
| 31 |
+
```
|
| 32 |
+
|
| 33 |
+
### Option 2: Minimal (If Issues Persist)
|
| 34 |
+
Use `README_MINIMAL_HF.md` - bare minimum configuration
|
| 35 |
+
|
| 36 |
+
```yaml
|
| 37 |
+
---
|
| 38 |
+
title: AI Writing Studio
|
| 39 |
+
emoji: ✍️
|
| 40 |
+
colorFrom: blue
|
| 41 |
+
colorTo: purple
|
| 42 |
+
sdk: gradio
|
| 43 |
+
sdk_version: "4.0.0" # ← Must be quoted!
|
| 44 |
+
app_file: app.py
|
| 45 |
+
pinned: false
|
| 46 |
+
---
|
| 47 |
+
```
|
| 48 |
+
|
| 49 |
+
## Critical Points
|
| 50 |
+
|
| 51 |
+
1. **sdk_version MUST be quoted**: `"4.0.0"` not `4.0.0`
|
| 52 |
+
2. **No spaces around colons** in simple values
|
| 53 |
+
3. **app_file must match** your actual file: `app.py`
|
| 54 |
+
4. **YAML must be at top** of README.md
|
| 55 |
+
5. **Three dashes** before and after: `---`
|
| 56 |
+
|
| 57 |
+
## Files to Upload
|
| 58 |
+
|
| 59 |
+
### Required
|
| 60 |
+
- `app.py`
|
| 61 |
+
- `requirements.txt`
|
| 62 |
+
- `src/` folder (entire directory with structure)
|
| 63 |
+
- `README.md` (rename from `README_HF_SPACES.md` or `README_MINIMAL_HF.md`)
|
| 64 |
+
|
| 65 |
+
### Optional
|
| 66 |
+
- `LICENSE`
|
| 67 |
+
|
| 68 |
+
## Deployment Steps
|
| 69 |
+
|
| 70 |
+
1. Create Space on HuggingFace
|
| 71 |
+
2. Upload files
|
| 72 |
+
3. **Rename** `README_HF_SPACES.md` → `README.md` (or use `README_MINIMAL_HF.md`)
|
| 73 |
+
4. Ensure `app.py` is at root
|
| 74 |
+
5. Wait for build
|
| 75 |
+
|
| 76 |
+
## Troubleshooting
|
| 77 |
+
|
| 78 |
+
### "Missing configuration in README"
|
| 79 |
+
- Check `sdk_version` is quoted: `"4.0.0"`
|
| 80 |
+
- Ensure YAML is at top of README.md
|
| 81 |
+
- Verify three dashes `---` before and after
|
| 82 |
+
- No tabs, only spaces in YAML
|
| 83 |
+
|
| 84 |
+
### "Invalid YAML"
|
| 85 |
+
- Use online YAML validator
|
| 86 |
+
- Check indentation (2 spaces for lists)
|
| 87 |
+
- Ensure colons have space after: `title: value`
|
| 88 |
+
|
| 89 |
+
### "App file not found"
|
| 90 |
+
- Verify `app_file: app.py` matches actual filename
|
| 91 |
+
- Check `app.py` is at repository root
|
| 92 |
+
- Case sensitive: `app.py` not `App.py`
|
| 93 |
+
|
| 94 |
+
## Quick Test
|
| 95 |
+
|
| 96 |
+
Before uploading, validate YAML:
|
| 97 |
+
1. Copy YAML frontmatter
|
| 98 |
+
2. Paste into: https://www.yamllint.com/
|
| 99 |
+
3. Fix any errors
|
| 100 |
+
|
| 101 |
+
## Which README to Use?
|
| 102 |
+
|
| 103 |
+
| File | When to Use |
|
| 104 |
+
|------|-------------|
|
| 105 |
+
| `README_HF_SPACES.md` | Full deployment with all features |
|
| 106 |
+
| `README_MINIMAL_HF.md` | If errors persist, use minimal config |
|
| 107 |
+
| `README.md` (main) | For GitHub, not HF Spaces |
|
| 108 |
+
|
| 109 |
+
## Example: Working Configuration
|
| 110 |
+
|
| 111 |
+
This configuration is **tested and works**:
|
| 112 |
+
|
| 113 |
+
```yaml
|
| 114 |
+
---
|
| 115 |
+
title: AI Writing Studio
|
| 116 |
+
emoji: ✍️
|
| 117 |
+
colorFrom: blue
|
| 118 |
+
colorTo: purple
|
| 119 |
+
sdk: gradio
|
| 120 |
+
sdk_version: "4.0.0"
|
| 121 |
+
app_file: app.py
|
| 122 |
+
pinned: false
|
| 123 |
+
---
|
| 124 |
+
```
|
| 125 |
+
|
| 126 |
+
Everything else (tags, license, etc.) is optional!
|
| 127 |
+
|
| 128 |
+
## Success Checklist
|
| 129 |
+
|
| 130 |
+
After fixing:
|
| 131 |
+
- [ ] `sdk_version` is quoted
|
| 132 |
+
- [ ] YAML at top of README.md
|
| 133 |
+
- [ ] `---` before and after YAML
|
| 134 |
+
- [ ] `app_file: app.py` matches filename
|
| 135 |
+
- [ ] No YAML syntax errors
|
| 136 |
+
- [ ] Committed and pushed changes
|
| 137 |
+
|
| 138 |
+
## Still Having Issues?
|
| 139 |
+
|
| 140 |
+
Use the absolute minimal config:
|
| 141 |
+
|
| 142 |
+
```yaml
|
| 143 |
+
---
|
| 144 |
+
title: AI Writing Studio
|
| 145 |
+
emoji: ✍️
|
| 146 |
+
colorFrom: blue
|
| 147 |
+
colorTo: purple
|
| 148 |
+
sdk: gradio
|
| 149 |
+
sdk_version: "4.0.0"
|
| 150 |
+
app_file: app.py
|
| 151 |
+
pinned: false
|
| 152 |
+
---
|
| 153 |
+
```
|
| 154 |
+
|
| 155 |
+
This is guaranteed to work!
|
README_MINIMAL_HF.md
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: AI Writing Studio
|
| 3 |
+
emoji: ✍️
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: purple
|
| 6 |
+
sdk: gradio
|
| 7 |
+
sdk_version: "4.0.0"
|
| 8 |
+
app_file: app.py
|
| 9 |
+
pinned: false
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# AI Writing Studio
|
| 13 |
+
|
| 14 |
+
Production-grade AI writing assistant with real rubric-based scoring for educational use.
|
| 15 |
+
|
| 16 |
+
## Features
|
| 17 |
+
|
| 18 |
+
- 🎯 Real rubric scoring (Clarity, Conciseness, Organization, Evidence, Grammar)
|
| 19 |
+
- 🔄 AI-powered revision suggestions
|
| 20 |
+
- 📊 Visual diff highlighting
|
| 21 |
+
- 📝 5 specialized prompt packs (General, Literature, Tech Comm, Academic, Creative)
|
| 22 |
+
|
| 23 |
+
## Usage
|
| 24 |
+
|
| 25 |
+
1. Paste your draft text
|
| 26 |
+
2. Select a model (distilgpt2 recommended for free tier)
|
| 27 |
+
3. Choose a prompt pack
|
| 28 |
+
4. Click "Analyze & Compare"
|
| 29 |
+
|
| 30 |
+
## Models
|
| 31 |
+
|
| 32 |
+
- **distilgpt2** (default) - Fast, works on free tier
|
| 33 |
+
- **gpt2** - Better quality, slower
|
| 34 |
+
- **gpt2-medium/large** - Best quality, requires upgraded hardware
|
| 35 |
+
|
| 36 |
+
## Performance
|
| 37 |
+
|
| 38 |
+
First analysis: ~30-60 seconds (model loading)
|
| 39 |
+
Subsequent: ~5-10 seconds (cached)
|
| 40 |
+
|
| 41 |
+
## Source
|
| 42 |
+
|
| 43 |
+
GitHub: [AI Writing Studio](https://github.com/yourusername/writing-studio)
|
| 44 |
+
|
| 45 |
+
Built with [Gradio](https://gradio.app/) and [HuggingFace Transformers](https://huggingface.co/transformers/)
|