Giter VIP home page Giter VIP logo

api_mv_gen's Introduction

Movie Genre API

This repository contains code for a Movie Genre API that predicts the genre of a movie based on its description. It uses a pre-trained model stored in the model-new.pt file.

Prerequisites

Before running the API, make sure that the model-new.pt file is present in the project directory. If it is not available, you can build the model by running the model_building.ipynb notebook or simply download from the below google drive link Link for built model

Docker Setup

To create a Docker container for the API, follow these steps:

  1. Open a terminal or command prompt.

  2. Navigate to the directory containing the Dockerfile.

  3. Build the Docker image using the following command:

    docker build -t movie_genre-api .
    

Running the API Server

To run the API server inside a Docker container, use the following command:

docker run -p 8000:8000 movie_genre-api

The API server will start and listen on port 8000.

Making API Requests

You can use the following curl command to get the genre of a movie by providing its description:

curl -d "description=A movie about 5 comedians who are on a trip to las vegas" -X POST http://127.0.0.1:8000/analyze

Make sure to replace 127.0.0.1:8000 with the appropriate address if running the API server on a different machine.

The response will contain the predicted genre of the movie.

api_mv_gen's People

Contributors

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