Code Monkey home page Code Monkey logo

primeveda_backend's Introduction

Primeveda Django Server

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.

Features

  • 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.

Installation

  1. Clone this repository to your local machine:

    git clone https://github.com/rishuriya/primeveda_backend.git
  2. Navigate to the project directory:

    cd primeveda-django
  3. Create a virtual environment (optional but recommended):

    python -m venv venv
  4. Install the Project depedencies:

    pip install -r requirements.txt
    
  5. Download Spacy nlp for similarity algorithms

    python -m spacy download en_core_web_md
    
  6. 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.

  7. Run database migrations:

    python manage.py makemigrations
    python manage.py migrate
  8. Run the Django development server:

    python manage.py runserver
  9. Access the server at http://127.0.0.1:8000/.

API Endpoints

  • Register User

    • URL: api/register/
    • Description: Register a new user account.
    • Method: POST
  • Activate User Account

    • URL: api/activate/<str:uidb64>/<str:token>/
    • Description: Activate a user account using a unique token.
    • Method: GET
  • Sign In

    • URL: api/sign-in/
    • Description: Sign in to an existing user account.
    • Method: POST
  • Generate Story

    • URL: api/generate-story/
    • Description: Generate a story based on Indian ancient text.
    • Method: POST
  • Current User Detail

    • URL: api/current-user/
    • Description: Retrieve details of the currently logged-in user.
    • Method: GET
  • Search API

    • URL: api/search/
    • Description: Search for stories based on user queries. if not available it will generate the story.
    • Method: POST
  • Update Profile

    • URL: api/update-profile/
    • Description: Edit the profile of the current user.
    • Method: PUT

primeveda_backend's People

Contributors

rishuriya avatar vishalj0501 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.