Coder Social home page Coder Social logo

ysterin / fastapi-fastai2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from boxofcereal/fastapi-fastai2

0.0 0.0 0.0 8 KB

Starter template for image recognition server with FastAPI

Dockerfile 4.47% Python 38.16% JavaScript 17.28% CSS 13.74% HTML 26.35%

fastapi-fastai2's Introduction

Fastai2 template with Fastapi

Usage

You will need to supply a model for your app. Clone the repo and open up app/server.py and replace export_url = "url" to your host of choice.

Dropbox

If you decide to use dropbox make sure you have dl=1 at the end of your url. EX: "https://www.dropbox.com/s/randnumbers/<export_name>.pkl?dl=1"

To run (with docker)

Clone the repo and use docker build . -t fastapi-fastai2 Then you can use docker run -p 8888:8000 fastapi-fastai2 and go to localhost:8888 to see the app.

Windows 10

When running docker run -p 8888:8000 fastapi-fastai2 after installation you may not be able to use localhost:8888. Docker was mapping ports to 127.0.0.1:8888 on my machine. Otherwise you can try netstat -a in your powershell to find the ip/port.

To run (without docker)

You can try python app/server.py although I've not been able to get pytorch/fastai to play nice on my windows machine. And on my ubuntu 19.04 machine I had several problems as well. Still unsolved.

Why?

I had quite a few difficulties getting the fastai2-starlette app working (it wouldn't) on my machine (windows 10). This repo may work for you, and if it does great! If not or, if you prefer FastAPI, please consider using this repo.

I want to thank muellerzr for his work on that repo as without it I wouldn't have had a straightforward reference. Please check out his walk with fastai2 it's really great!

fastapi-fastai2's People

Contributors

boxofcereal avatar ysterin 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.