Update app.py
Browse files
app.py
CHANGED
|
@@ -1710,30 +1710,3 @@ if __name__ == "__main__":
|
|
| 1710 |
time.sleep(1)
|
| 1711 |
except KeyboardInterrupt:
|
| 1712 |
print("🛑 Shutting down servers...")
|
| 1713 |
-
```
|
| 1714 |
-
|
| 1715 |
-
🎯 Key Features of This Complete Script
|
| 1716 |
-
|
| 1717 |
-
Two Pipelines in One Space:
|
| 1718 |
-
|
| 1719 |
-
1. Standard Pipeline - Your original approach (fast, good consistency)
|
| 1720 |
-
2. Enhanced Pipeline - 3-stage approach (slower, perfect consistency)
|
| 1721 |
-
|
| 1722 |
-
Enhanced Pipeline Benefits:
|
| 1723 |
-
|
| 1724 |
-
· ✅ Perfect character consistency (same images reused)
|
| 1725 |
-
· ✅ Better prompt comprehension (separated generation)
|
| 1726 |
-
· ✅ Organized OCI storage with subfolders
|
| 1727 |
-
· ✅ Professional composition with inpainting
|
| 1728 |
-
|
| 1729 |
-
Usage:
|
| 1730 |
-
|
| 1731 |
-
· For testing/quick stories: Use standard pipeline
|
| 1732 |
-
· For final production: Use enhanced pipeline with "pipeline_type": "enhanced"
|
| 1733 |
-
|
| 1734 |
-
API Endpoints:
|
| 1735 |
-
|
| 1736 |
-
· Same endpoint for both: POST /api/generate-storybook
|
| 1737 |
-
· Just add "pipeline_type": "enhanced" to your n8n request
|
| 1738 |
-
|
| 1739 |
-
This gives you the best of both worlds in a single Hugging Face Space! 🚀
|
|
|
|
| 1710 |
time.sleep(1)
|
| 1711 |
except KeyboardInterrupt:
|
| 1712 |
print("🛑 Shutting down servers...")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|