Spaces:
Running
Running
Syed Arfan
Claude
commited on
Commit
Β·
d60e06b
1
Parent(s):
52cdaa9
Update README with live demo links and tech badges
Browse files- Added prominent Live Demo and API Status badges
- Added tech stack badges (Python, FastAPI, React, TypeScript, etc.)
- Added live demo section with all deployment URLs
- Updated deployment section with architecture diagram
- Added Hugging Face Spaces deployment instructions
- Updated tech stack table with all technologies
π€ Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
README.md
CHANGED
|
@@ -9,9 +9,35 @@ app_port: 7860
|
|
| 9 |
|
| 10 |
# Sentiment Analysis API
|
| 11 |
|
| 12 |
-
](https://simplyarfan.github.io/Sentiment-API/)
|
| 13 |
+
[](https://huggingface.co/spaces/simplyarfan/sentiment-api)
|
| 14 |
+
|
| 15 |
+

|
| 16 |
+

|
| 17 |
+
|
| 18 |
+
### Tech Stack
|
| 19 |
+

|
| 20 |
+

|
| 21 |
+

|
| 22 |
+

|
| 23 |
+

|
| 24 |
+

|
| 25 |
+

|
| 26 |
+

|
| 27 |
|
| 28 |
+
---
|
| 29 |
+
|
| 30 |
+
A production-ready sentiment analysis API built with FastAPI, featuring multi-service architecture with PostgreSQL, Redis caching, and a modern React frontend. Analyzes text sentiment (POSITIVE/NEGATIVE) with 99%+ accuracy using DistilBERT transformer model.
|
| 31 |
+
|
| 32 |
+
## Live Demo
|
| 33 |
+
|
| 34 |
+
**Try it now:** [https://simplyarfan.github.io/Sentiment-API/](https://simplyarfan.github.io/Sentiment-API/)
|
| 35 |
+
|
| 36 |
+
| Component | URL |
|
| 37 |
+
|-----------|-----|
|
| 38 |
+
| **Frontend** | [simplyarfan.github.io/Sentiment-API](https://simplyarfan.github.io/Sentiment-API/) |
|
| 39 |
+
| **API** | [huggingface.co/spaces/simplyarfan/sentiment-api](https://huggingface.co/spaces/simplyarfan/sentiment-api) |
|
| 40 |
+
| **API Docs** | [simplyarfan-sentiment-api.hf.space/docs](https://simplyarfan-sentiment-api.hf.space/docs) |
|
| 41 |
|
| 42 |
## Features
|
| 43 |
|
|
|
|
| 169 |
|
| 170 |
| Category | Technology | Purpose |
|
| 171 |
|----------|-----------|---------|
|
| 172 |
+
| **Frontend** | React 18 + TypeScript | Modern, type-safe UI |
|
| 173 |
+
| **Styling** | Tailwind CSS | Utility-first CSS framework |
|
| 174 |
| **API Framework** | FastAPI | High-performance async API |
|
| 175 |
+
| **ML Model** | DistilBERT (Hugging Face) | Sentiment classification |
|
| 176 |
| **Database** | PostgreSQL 15 | Persistent data storage |
|
| 177 |
| **Cache** | Redis 7 | Sub-millisecond lookups |
|
|
|
|
| 178 |
| **Containerization** | Docker + Compose | Service orchestration |
|
| 179 |
+
| **Frontend Hosting** | GitHub Pages | Static site hosting |
|
| 180 |
+
| **API Hosting** | Hugging Face Spaces | ML-optimized container hosting |
|
| 181 |
+
| **Database Hosting** | Render | Managed PostgreSQL & Redis |
|
| 182 |
+
| **Testing** | pytest + Vitest | Backend & frontend testing |
|
| 183 |
+
| **CI/CD** | GitHub Actions | Automated testing & deployment |
|
| 184 |
|
| 185 |
---
|
| 186 |
|
|
|
|
| 349 |
|
| 350 |
## Deployment
|
| 351 |
|
| 352 |
+
### Live Production Environment
|
| 353 |
+
|
| 354 |
+
The application is deployed and running:
|
| 355 |
+
|
| 356 |
+
| Service | Platform | URL |
|
| 357 |
+
|---------|----------|-----|
|
| 358 |
+
| **Frontend** | GitHub Pages | [simplyarfan.github.io/Sentiment-API](https://simplyarfan.github.io/Sentiment-API/) |
|
| 359 |
+
| **API** | Hugging Face Spaces | [simplyarfan-sentiment-api.hf.space](https://simplyarfan-sentiment-api.hf.space) |
|
| 360 |
+
| **Database** | Render PostgreSQL | Managed cloud database |
|
| 361 |
+
| **Cache** | Render Redis | Managed Redis instance |
|
| 362 |
+
|
| 363 |
+
### Architecture
|
| 364 |
+
```
|
| 365 |
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 366 |
+
β GitHub Pages (Frontend) β
|
| 367 |
+
β React + TypeScript + Tailwind CSS β
|
| 368 |
+
β https://simplyarfan.github.io/Sentiment-API/ β
|
| 369 |
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 370 |
+
β
|
| 371 |
+
βΌ API Calls
|
| 372 |
+
ββββββββββββββββββββββββββββββββββββββββββοΏ½οΏ½οΏ½ββββββββββββββββββββ
|
| 373 |
+
β Hugging Face Spaces (API) β
|
| 374 |
+
β FastAPI + DistilBERT (2GB RAM, Docker) β
|
| 375 |
+
β https://simplyarfan-sentiment-api.hf.space β
|
| 376 |
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 377 |
+
β
|
| 378 |
+
ββββββββββββββ΄βββββββββββββ
|
| 379 |
+
βΌ βΌ
|
| 380 |
+
ββββββββββββββββββββββββ ββββββββββββββββββββββββ
|
| 381 |
+
β Render PostgreSQL β β Render Redis β
|
| 382 |
+
β Persistent Storage β β Caching Layer β
|
| 383 |
+
ββββββββββββββββββββββββ ββββββββββββββββββββββββ
|
| 384 |
+
```
|
| 385 |
+
|
| 386 |
### Local Development
|
| 387 |
```bash
|
| 388 |
docker-compose up
|
| 389 |
```
|
| 390 |
|
| 391 |
+
### Deploy Your Own
|
| 392 |
+
|
| 393 |
+
**Frontend (GitHub Pages):**
|
| 394 |
+
1. Fork this repository
|
| 395 |
+
2. Enable GitHub Pages in Settings
|
| 396 |
+
3. Set `VITE_API_BASE_URL` in Actions variables
|
| 397 |
+
4. Push to trigger deployment
|
| 398 |
+
|
| 399 |
+
**API (Hugging Face Spaces):**
|
| 400 |
+
1. Create a Space at [huggingface.co/spaces](https://huggingface.co/spaces)
|
| 401 |
+
2. Select Docker SDK
|
| 402 |
+
3. Push code: `git push https://huggingface.co/spaces/YOUR_USERNAME/sentiment-api main`
|
| 403 |
+
4. Add `DATABASE_URL` and `REDIS_URL` as secrets
|
| 404 |
|
| 405 |
---
|
| 406 |
|