Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,12 +1,51 @@
|
|
| 1 |
---
|
| 2 |
-
title: Video
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
-
sdk: gradio
|
| 7 |
-
sdk_version: 5.35.0
|
| 8 |
app_file: app.py
|
| 9 |
-
|
| 10 |
---
|
| 11 |
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: Automated AI Video & Social Media Publisher (n8n converted)
|
| 3 |
+
emoji: 🚀
|
| 4 |
+
colorFrom: purple
|
| 5 |
+
colorTo: indigo
|
| 6 |
+
sdk: gradio # Or 'gradio' if you choose to use Gradio for your UI
|
|
|
|
| 7 |
app_file: app.py
|
| 8 |
+
python_version: "3.10" # Or 3.9, 3.11, etc., as per your preference and compatibility
|
| 9 |
---
|
| 10 |
|
| 11 |
+
# Automated AI Video & Social Media Publisher
|
| 12 |
+
|
| 13 |
+
This Hugging Face Space automates the process of creating AI avatar videos and publishing them to social media. It is a direct Python conversion of an n8n workflow.
|
| 14 |
+
|
| 15 |
+
## How it Works
|
| 16 |
+
|
| 17 |
+
The workflow performs the following steps:
|
| 18 |
+
|
| 19 |
+
1. **News Research (Hacker News)**: Fetches the top 10 AI/LLM-related stories from Hacker News and selects the most viral one.
|
| 20 |
+
2. **Script Generation (OpenAI)**: Generates a 30-second monologue script for an AI avatar video based on the selected news story and comments.
|
| 21 |
+
3. **Caption Generation (OpenAI)**: Creates both long and short captions for social media posts.
|
| 22 |
+
4. **AI Video Creation (Heygen)**: Uses the generated script to create an AI avatar video.
|
| 23 |
+
5. **Media Upload (Blotato)**: Uploads the generated video to Blotato's media library.
|
| 24 |
+
6. **Social Media Publishing (Blotato)**: Publishes the video and captions to various social media platforms (currently YouTube is enabled in the Python code, others are disabled as per the n8n workflow).
|
| 25 |
+
|
| 26 |
+
## Setup & Secrets
|
| 27 |
+
|
| 28 |
+
To run this Space, you **must** set the following environment variables as **Space Secrets** in the "Settings" tab of your Hugging Face Space:
|
| 29 |
+
|
| 30 |
+
* `OPENAI_API_KEY`: Your OpenAI API key.
|
| 31 |
+
* `HEYGEN_API_KEY`: Your Heygen API key (a paid Heygen plan is required for video generation, as the free plan is insufficient).
|
| 32 |
+
* `BLOTATO_API_KEY`: Your Blotato API key.
|
| 33 |
+
|
| 34 |
+
**Optional Environment Variables (set if different from defaults or dynamic):**
|
| 35 |
+
|
| 36 |
+
* `HEYGEN_AVATAR_ID` (Default: `c67f3f55c5fd49d080e19a2ea9666e77`)
|
| 37 |
+
* `HEYGEN_VOICE_ID` (Default: `e515d746526f448fa533afddc97e4933`)
|
| 38 |
+
* `HEYGEN_BACKGROUND_VIDEO_URL` (Default: `https://database.blotato.io/storage/v1/object/public/public_media/4ddd33eb-e811-4ab5-93e1-2cd0b7e8fb3f/videogen2-render-e6b398a2-5859-4a77-88ef-2345bcefdc98.mp4`)
|
| 39 |
+
* `BLOTATO_INSTAGRAM_ID`
|
| 40 |
+
* `BLOTATO_YOUTUBE_ID` (Default: `5174`)
|
| 41 |
+
* `BLOTATO_TIKTOK_ID`
|
| 42 |
+
* `BLOTATO_FACEBOOK_ID`
|
| 43 |
+
* `BLOTATO_FACEBOOK_PAGE_ID`
|
| 44 |
+
* `BLOTATO_THREADS_ID`
|
| 45 |
+
* `BLOTATO_TWITTER_ID`
|
| 46 |
+
* `BLOTATO_LINKEDIN_ID`
|
| 47 |
+
* `BLOTATO_PINTEREST_ID`
|
| 48 |
+
* `BLOTATO_PINTEREST_BOARD_ID`
|
| 49 |
+
* `BLOTATO_BLUESKY_ID`
|
| 50 |
+
|
| 51 |
+
---
|