Hadam Diary Generative Server
Welcome to the Hadam Diary Generative Server! This FastAPI server enables the creation and management of diary entries, integrating cutting-edge technologies:
- OpenAI's GPT-3 for text generation.
- Stable Diffusion for image generation.
- DeepL API for translating tentative results.
Hadam is live on Amazon EC2, with generated images stored in an Amazon S3 bucket.
- 📔 Diary Creation: Generate diary entries using GPT-3 based on user-provided keywords about their experiences, emotions, and details of the day.
- ✍️ Diary Regeneration: Allows users to regenerate the text of existing diary entries if they are not satisfied with the current content.
- 🖼️ Image Regeneration: Allows users to regenerate images for diary entries using the Stable Diffusion API if they are not satisfied with the current content.
To set up the server locally, follow these steps:
-
Clone the Repository
git clone [repository URL] cd [repository directory]
-
Install Requirements
pip install -r requirements.txt
-
Set Up Environment Variables Create a
.env
file in the root directory with the following content:DB_USER=[your_database_username] DB_PASS=[your_database_password] DB_HOST=[your_database_host] DB_NAME=[your_database_name] OPENAI_API_KEY=[your_openai_api_key] STABLE_DIFFUSION_API_KEY=[your_stable_diffusion_api_key] DEEPL_API_KEY=[your_deepl_api_key]
Note: Replace placeholders with actual values.
-
Run the Server
uvicorn main:app --reload
After starting the server, the following endpoints are available:
- POST
/diary/create
: Create a new diary entry. - PUT
/diary/recreate/{diary_id}
: Regenerate the text of an existing diary entry. - PUT
/diary/regenerate-image/{diary_id}
: Regenerate the image of an existing diary entry.
You can access the auto-generated FastAPI documentation on your local server at http://127.0.0.1:8000/docs
after starting the server.
Role | What we Used |
---|---|
Framework | |
Storage Service | |
Hosting Service | |
Programming Language | |
API & Translation |
- Email: 422mukgui@gachon.ac.kr
- GitHub: MINUUUUUUUUUUUU
- Email: hyashin1998@gmail.com
- GitHub: HyoYoungShin