Primeveda is a Django server application that specializes in generating stories based on the essence of Indian ancient texts. This application leverages the Palm API to generate stories and content. In the future, we plan to transition to our own NLP (Natural Language Processing) model once we collect enough data and release our main app.
- Story Generation: Generate stories with Indian cultural and ancient text influences.
- Integration with Palm API: Utilize the Palm API for text generation.
- Future NLP Model: Planning to develop and integrate our own NLP model for improved story generation.
-
Clone this repository to your local machine:
git clone https://github.com/rishuriya/primeveda_backend.git
-
Navigate to the project directory:
cd primeveda-django
-
Create a virtual environment (optional but recommended):
python -m venv venv
-
Install the Project depedencies:
pip install -r requirements.txt
-
Download Spacy nlp for similarity algorithms
python -m spacy download en_core_web_md
-
Create an
.env
file in the project directory with the following content:SECRET_KEY=Add your value DEBUG=True EMAIL_HOST=smtp.gmail.com EMAIL_PORT=587 EMAIL_HOST_USER = email EMAIL_HOST_PASSWORD = app password PALM_API_KEY = Palm api key
Replace the placeholders with your actual values.
-
Run database migrations:
python manage.py makemigrations python manage.py migrate
-
Run the Django development server:
python manage.py runserver
-
Access the server at
http://127.0.0.1:8000/
.
-
Register User
- URL:
api/register/
- Description: Register a new user account.
- Method: POST
- URL:
-
Activate User Account
- URL:
api/activate/<str:uidb64>/<str:token>/
- Description: Activate a user account using a unique token.
- Method: GET
- URL:
-
Sign In
- URL:
api/sign-in/
- Description: Sign in to an existing user account.
- Method: POST
- URL:
-
Generate Story
- URL:
api/generate-story/
- Description: Generate a story based on Indian ancient text.
- Method: POST
- URL:
-
Current User Detail
- URL:
api/current-user/
- Description: Retrieve details of the currently logged-in user.
- Method: GET
- URL:
-
Search API
- URL:
api/search/
- Description: Search for stories based on user queries. if not available it will generate the story.
- Method: POST
- URL:
-
Update Profile
- URL:
api/update-profile/
- Description: Edit the profile of the current user.
- Method: PUT
- URL: