Update README.md
Browse files
README.md
CHANGED
|
@@ -1,59 +1,10 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
โโโ main.py โ FastAPI
|
| 10 |
-
โโโ renderer.py โ ู
ุญุฑู ุงูููุฏูู
|
| 11 |
-
โโโ Dockerfile โ ููู HuggingFace
|
| 12 |
-
โโโ templates/
|
| 13 |
-
โ โโโ __init__.py โ ุณุฌู ุงูุชู
ุจูุชุณ
|
| 14 |
-
โ โโโ base.py โ ุงูููุงุณ ุงูุฃุณุงุณู
|
| 15 |
-
โ โโโ showcase_arabic.py โ ุชู
ุจูุช ุนุฑุจู
|
| 16 |
-
```
|
| 17 |
-
|
| 18 |
-
## ุงูู Endpoints
|
| 19 |
-
|
| 20 |
-
| Method | URL | ุงููุธููุฉ |
|
| 21 |
-
|--------|-----|---------|
|
| 22 |
-
| GET | `/` | ู
ุนููู
ุงุช ุงูู API |
|
| 23 |
-
| GET | `/templates` | ุงูุชู
ุจูุชุณ ุงูู
ุชุงุญุฉ |
|
| 24 |
-
| POST | `/render` | ุงุนู
ู ููุฏูู |
|
| 25 |
-
| GET | `/video/{id}` | ุญู
ูู ุงูููุฏูู |
|
| 26 |
|
| 27 |
-
#
|
| 28 |
-
|
| 29 |
-
```json
|
| 30 |
-
POST /render
|
| 31 |
-
{
|
| 32 |
-
"template": "showcase_arabic",
|
| 33 |
-
"title": "ุงุญุฏุซ ุงุฌูุฒุฉ\nููุฑุจุงุฆูุฉ",
|
| 34 |
-
"discount": "ุฎุตู
20ูช",
|
| 35 |
-
"badge": "ุถู
ุงู\nุณูุชูู",
|
| 36 |
-
"phone": "+20-100-000-0000",
|
| 37 |
-
"website": "www.example.com",
|
| 38 |
-
"image_path": "/tmp/product.png",
|
| 39 |
-
"music_path": "/tmp/music.mp3"
|
| 40 |
-
}
|
| 41 |
-
```
|
| 42 |
-
|
| 43 |
-
## ุฅุถุงูุฉ ุชู
ุจูุช ุฌุฏูุฏ
|
| 44 |
-
|
| 45 |
-
1. ุนู
ู ู
ูู `templates/my_template.py`
|
| 46 |
-
2. ุชุฑุซ ู
ู `BaseTemplate`
|
| 47 |
-
3. ุจุชุนู
ู `make_frame` ุจุชุงุนู
|
| 48 |
-
4. ุชุถููู ูู `templates/__init__.py`
|
| 49 |
-
|
| 50 |
-
```python
|
| 51 |
-
from .my_template import MyTemplate
|
| 52 |
-
|
| 53 |
-
TEMPLATES = {
|
| 54 |
-
t.NAME: t for t in [
|
| 55 |
-
ShowcaseArabic,
|
| 56 |
-
MyTemplate, # โ ููุง
|
| 57 |
-
]
|
| 58 |
-
}
|
| 59 |
-
```
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: Video Showcase API
|
| 3 |
+
emoji: ๐ฌ
|
| 4 |
+
colorFrom: purple
|
| 5 |
+
colorTo: blue
|
| 6 |
+
sdk: docker
|
| 7 |
+
pinned: false
|
| 8 |
+
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
|
| 10 |
+
# ๐ฌ Video Showcase API
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|