|
|
--- |
|
|
title: Creative Writing Assistant Chatbot |
|
|
emoji: 💬 |
|
|
colorFrom: yellow |
|
|
colorTo: purple |
|
|
sdk: gradio |
|
|
sdk_version: 5.42.0 |
|
|
app_file: app.py |
|
|
pinned: false |
|
|
hf_oauth: true |
|
|
hf_oauth_scopes: |
|
|
- inference-api |
|
|
license: mit |
|
|
short_description: AI-Powered Writing with Seamless Paywall Monetization |
|
|
--- |
|
|
|
|
|
An example chatbot using [Gradio](https://gradio.app), [`huggingface_hub`](https://huggingface.co/docs/huggingface_hub/v0.22.2/en/index), and the [Hugging Face Inference API](https://huggingface.co/docs/api-inference/index). |
|
|
|
|
|
|
|
|
Creative Writing Assistant Chatbot with Paywalls.ai Integration |
|
|
Overview |
|
|
An AI chatbot that helps users write short creative texts (stories, poems, scripts) with AI suggestions. Basic features are free; advanced options like longer output, style choices, and export function require unlocking via a Paywalls.ai paywall. |
|
|
|
|
|
Key Features |
|
|
Text input for user story or poem prompt |
|
|
|
|
|
AI-generated creative completion or suggestions |
|
|
|
|
|
Free tier limits output length and feature set |
|
|
|
|
|
Paywall-gated advanced features: |
|
|
|
|
|
Longer text generation |
|
|
|
|
|
Style/theme customization (e.g., poetic, dramatic, comedic) |
|
|
|
|
|
Export as downloadable text file (PDF or TXT) |
|
|
|
|
|
Tech Stack |
|
|
Frontend: React or Next.js for UI (simple web app) |
|
|
|
|
|
Backend: Python Flask/FastAPI or Node.js for API handling |
|
|
|
|
|
AI Model: Hugging Face Transformers (e.g., GPT-2 or GPT-3 API via Hugging Face) |
|
|
|
|
|
Monetization: Paywalls.ai proxy integration for paywall gating |
|
|
|
|
|
Deployment: Vercel (frontend) and Render or similar (backend) |
|
|
|
|
|
Workflow |
|
|
User inputs prompt on UI. |
|
|
|
|
|
Frontend sends prompt to backend AI endpoint. |
|
|
|
|
|
Backend calls Hugging Face AI to generate response—applies length and feature restrictions based on paywall status. |
|
|
|
|
|
Frontend queries Paywalls.ai API to check unlocked features. |
|
|
|
|
|
If advanced features are locked: |
|
|
|
|
|
Frontend shows a paywall modal to purchase/unlock. |
|
|
|
|
|
Unlock triggers Paywalls.ai payment flow. |
|
|
|
|
|
Once unlocked, user can request longer generations, different styles, and export text. |
|
|
|
|
|
User uses exported file or saved creative work offline. |
|
|
|
|
|
Paywalls.ai Integration |
|
|
Use Paywalls.ai programmable proxy to gate API responses based on user’s payment status. |
|
|
|
|
|
API calls for premium features trigger paywall checks. |
|
|
|
|
|
Implement minimal logic client-side to show appropriate paywall prompts. |
|
|
|
|
|
Collect payments through Paywalls.ai’s supported payment methods. |
|
|
|
|
|
Minimal Example Components |
|
|
Frontend |
|
|
|
|
|
Text input box for prompt |
|
|
|
|
|
Generate button |
|
|
|
|
|
Toggle for style (locked behind paywall) |
|
|
|
|
|
Export button (locked behind paywall) |
|
|
|
|
|
Paywall modal that calls Paywalls.ai API |
|
|
|
|
|
Backend |
|
|
|
|
|
Endpoint to receive prompt + style + length request |
|
|
|
|
|
Call to Hugging Face API with params |
|
|
|
|
|
Proxy paywall check via Paywalls.ai before serving premium content |