image_generator
所属分类:内容生成
开发工具:PowerShell
文件大小:0KB
下载次数:0
上传日期:2023-09-29 18:22:09
上 传 者:
sh-1993
说明: 由DALL-E供电的图像发生器,
(Image generator powered by DALL-E,)
文件列表:
LICENSE (11357, 2023-09-29)
backend/ (0, 2023-09-29)
backend/app.py (840, 2023-09-29)
backend/venv/ (0, 2023-09-29)
backend/venv/Scripts/ (0, 2023-09-29)
backend/venv/Scripts/Activate.ps1 (25697, 2023-09-29)
backend/venv/Scripts/activate (2036, 2023-09-29)
backend/venv/Scripts/activate.bat (1000, 2023-09-29)
backend/venv/Scripts/deactivate.bat (371, 2023-09-29)
backend/venv/Scripts/pip.exe (108443, 2023-09-29)
backend/venv/Scripts/pip3.11.exe (108443, 2023-09-29)
backend/venv/Scripts/pip3.exe (108443, 2023-09-29)
backend/venv/Scripts/python.exe (270608, 2023-09-29)
backend/venv/Scripts/pythonw.exe (259352, 2023-09-29)
backend/venv/pyvenv.cfg (345, 2023-09-29)
client/ (0, 2023-09-29)
client/package-lock.json (1260585, 2023-09-29)
client/package.json (836, 2023-09-29)
client/public/ (0, 2023-09-29)
client/public/favicon.ico (3870, 2023-09-29)
client/public/index.html (1212, 2023-09-29)
client/public/logo192.png (5347, 2023-09-29)
client/public/logo512.png (9664, 2023-09-29)
client/public/manifest.json (492, 2023-09-29)
client/public/robots.txt (67, 2023-09-29)
client/src/ (0, 2023-09-29)
client/src/App.css (1408, 2023-09-29)
client/src/App.js (1702, 2023-09-29)
client/src/App.test.js (246, 2023-09-29)
client/src/index.css (366, 2023-09-29)
client/src/index.js (582, 2023-09-29)
client/src/logo.svg (2632, 2023-09-29)
client/src/reportWebVitals.js (362, 2023-09-29)
client/src/setupTests.js (241, 2023-09-29)
# Image Generator App
This project is a full-stack application that generates images based on user input, using OpenAI's hypothetical image generation API. The backend is implemented using Python and Flask, and the frontend is built using React.
## Project Structure
```
.
├── client # React Frontend
│ ├── src # Source Files
│ ├── ...
├── backend # Python Backend
| ├── app.py # Flask App
```
## Setup and Run
### Backend
#### 1. Setup Virtual Environment and Install Dependencies
```
mkdir image-generator
cd image-generator
python3 -m venv venv
source venv/bin/activate # On Windows, use `venv\Scripts\activate`
pip install Flask openai requests flask-cors
```
#### 2. Run the Backend
```
source venv/bin/activate # On Windows, use `venv\Scripts\activate`
python app.py
```
### Frontend
#### 3. Setup and Install Dependencies
```
cd client
npm install
```
#### 4. Run the Frontend
```
npm start
```
## Usage
Navigate to `http://localhost:3000` in your web browser and enter the image prompt. Click on `Generate` to create and display the image.
## Security Considerations
For production deployment, please consider the following:
- Use environment variables or secure vaults to handle API keys and other sensitive information.
- Specify allowed origins, methods, and headers explicitly in CORS configurations to minimize security risks.
- Use a WSGI server for Flask and a web server to serve your React app.
## License
This project is [MIT](https://github.com/JocheRDevelopment/image_generator/blob/master/LICENSE) licensed.
近期下载者:
相关文件:
收藏者: