@@ -35,21 +35,22 @@ Install with:
3535
3636``` bash
3737pip install -r requirements.txt
38-
3938requirements.txt:
4039
4140nginx
42-
41+ Copy
42+ Edit
4343Flask
4444Flask-Cors
4545torch
4646diffusers
4747transformers
4848accelerate
4949safetensors
50-
5150🚀 Run the Flask Server
52-
51+ bash
52+ Copy
53+ Edit
5354cd python-server
5455python app.py
5556The server will start on http://localhost:5000
@@ -58,40 +59,41 @@ The server will start on http://localhost:5000
5859POST /api/text-to-image
5960
6061json
61-
62+ Copy
63+ Edit
6264{
6365 " prompt" : " a cyberpunk city at night with glowing lights"
6466}
6567Returns: image/png (generated AI image)
6668
6769⚙️ Frontend (React + Vite)
6870📂 Frontend Directory: client/
69-
7071📦 Setup
71-
72+ bash
73+ Copy
74+ Edit
7275cd client
7376npm install
74-
7577🚀 Run Locally
76-
78+ bash
79+ Copy
80+ Edit
7781npm run dev
7882The frontend will start on http://localhost:5173
7983
8084Make sure the backend is also running at http://localhost:5000 or change the API URL in your React app.
8185
8286🌐 GitHub Pages Deployment
83-
8487Vite is configured to deploy to GitHub Pages with:
8588
8689js
87-
90+ Copy
91+ Edit
8892// vite.config.js
8993export default defineConfig({
9094 base: ' /ai-media-project/' ,
9195});
92-
9396📦 Deployment via GitHub Actions
94-
9597.github/workflows/deploy.yml handles automatic CI/CD:
9698
9799Builds React app
@@ -102,7 +104,8 @@ Deploys to GitHub Pages
102104
103105🗂️ Project Structure
104106csharp
105-
107+ Copy
108+ Edit
106109ai-media-project/
107110├── client/ # Frontend (React + Vite)
108111│ ├── public/
@@ -118,9 +121,7 @@ ai-media-project/
118121│ └── deploy.yml
119122│
120123└── README.md
121-
122124🔐 Environment Notes
123-
124125Backend supports CPU by default, but will use GPU if available (torch.cuda.is_available()).
125126
126127Uses the Hugging Face model: runwayml/stable-diffusion-v1-5.
@@ -138,7 +139,8 @@ Port configuration: Flask runs on 5000, Vite runs on 5173.
138139
139140🚧 User account and project save
140141
141- 🧑💻 Developed By Yash Dhanani
142+ 🧑💻 Developed By
143+ Yash Dhanani
142144
143145🔗 GitHub
144146
@@ -150,3 +152,9 @@ Port configuration: Flask runs on 5000, Vite runs on 5173.
150152© 2025 Yash Dhanani. All Rights Reserved.
151153
152154This project is intended for learning, experimentation, and demo purposes only.
155+
156+ yaml
157+ Copy
158+ Edit
159+
160+ ---
0 commit comments