[{"data":1,"prerenderedAt":260},["ShallowReactive",2],{"project-24373459":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":29,"sentiment":30,"stance_mix":31,"scored_comments":36,"aspects":37,"strip":40,"post_text":42,"what":43,"said":83,"maker_in_thread":150,"shape":160,"grid":163,"attempts":213,"same_week":221,"maker_shows":251,"maker_hidden":252,"reader_version":253,"card":254},"24373459","my_ml_service","Build Machine Learning Web-Service with Python and Django","title","Show HN: Build Machine Learning Web-Service with Python and Django","https:\u002F\u002Fgithub.com\u002Fpplonski\u002Fmy_ml_service","github.com","pplonski86",1599213360,2020,67,22,895,3028,30,"notable","learning_science","tutorial","library",[24,25,26,27,28],"django","machine learning","rest api","model serving","python","curious",-0.176,{"positive":32,"neutral":33,"mixed":34,"critical":35},1,4,0,3,8,{"design":38,"idea":39},{"positive":32,"critical":35},{"positive":34,"critical":34},[34,34,34,34,34,34,34,32,32,35,34,34,34,34,35,34,34,32,35,35,34,41],5,null,{"problem":44,"audience":42,"pricing":42,"motivation":42,"time_to_build":42,"stack":51,"openness":82,"stage":82,"team_size":82},{"value":45,"source":46,"evidence":47},"Serving machine learning models as REST APIs","maker",[48],{"id":49,"by":11,"text":50},"24376028","It really depends. For sure there are models which should be processed in the background. It is a very basic tutorial that shows how simple ML models can be used as REST API. In…",[52,57,64,68,74,78],{"value":53,"source":46,"evidence":54},"Python",[55],{"id":56},"post",{"value":58,"source":46,"evidence":59},"Django",[60,61],{"id":56},{"id":62,"by":11,"text":63},"24376089","You are right! I like Django admin panel, without coding you get UI and I'm comfortable with Django + DRF. In Flask you need to add many things to make it usable. If you check…",{"value":65,"source":46,"evidence":66},"Django REST Framework",[67],{"id":62,"by":11,"text":63},{"value":69,"source":46,"evidence":70},"SQLite",[71],{"id":72,"by":11,"text":73},"24376145","In this tutorial I've used SQLite. I use PostgreSQL for production services. I don't remember now why I used such type.",{"value":75,"source":46,"evidence":76},"PostgreSQL",[77],{"id":72,"by":11,"text":73},{"value":79,"source":46,"evidence":80},"scikit-learn Random Forest",[81],{"id":49,"by":11,"text":50},"unknown",{"praise":84,"objections":89,"requests":109,"questions":114,"alternatives":121},[85],{"value":86,"source":46,"evidence":87},"Django admin panel gives UI without extra coding",[88],{"id":62,"by":11,"text":63},[90,98],{"value":91,"source":92,"evidence":93},"Flask is simpler and lighter for a REST model endpoint","commenter",[94],{"id":95,"by":96,"text":97},"24374778","VHRanger","Why use Django when Flask is so much simpler and has less overhead? For just a REST ML model endpoint, Flask does everything you need, and no more. It's a perfect fit.",{"value":99,"source":92,"evidence":100},"Running models inside views blocks requests under load",[101,105],{"id":102,"by":103,"text":104},"24375165","ampdepolymerase","Calling the ML model should be done via Django Channels or a similar background queue and not directly within the view (request handler) as if the inputs\u002Finference is too big, it…",{"id":106,"by":107,"text":108},"24375807","tecoholic","I agree. The ML Algorithms and models can run into huge sizes. I have one with half a gig of serialised model, when running takes up close to 3.5 Gigs. This approach of directly…",[110],{"value":111,"source":46,"evidence":112},"Add background processing for large models",[113],{"id":49,"by":11,"text":50},[115],{"value":116,"source":92,"evidence":117},"Why CharField with max_length 10K instead of TextField",[118],{"id":119,"by":107,"text":120},"24375724","I noticed that the models use CharField with a max_length of 10K. Why not use TextField?",[122,129,136,143],{"value":123,"source":92,"evidence":124},"Gradio",[125],{"id":126,"by":127,"text":128},"24380986","Aliabid94","[Gradio](gradio.app) can save a lot of time to serve the same purpose - making it super easy to serve any python based ML. It provides dozens of interface components, including…",{"value":130,"source":92,"evidence":131},"inferrd",[132],{"id":133,"by":134,"text":135},"24376676","theo31","For anyone looking to deploy ML models a little bit easier, check out https:\u002F\u002Finferrd.com It's a simple drag and drop to deploy tensorflow, scikit, spacy, keras or pytorch.",{"value":137,"source":92,"evidence":138},"deepserve.ai",[139],{"id":140,"by":141,"text":142},"24376256","jeffrwells","For anyone who is looking to make deploying ML models easier, I created https:\u002F\u002Fdeepserve.ai You can run `deepserve deploy` on the command line and it will stand up a REST…",{"value":144,"source":92,"evidence":145},"FastAPI",[146],{"id":147,"by":148,"text":149},"24374882","anaganisk","May be Op wanted to take the advantage of batteries included features like, admin panel, templates etc. Or is just very comfortable with django. If we are talking speed and…",{"comments":151,"answered":34,"key":152},6,[153,154,157],{"id":49,"text":50},{"id":155,"text":156},"24376800","Nice! 1. Is it open-source? 2. Can I add models with REST API? 3. How do you handle large models? Are they working in the background or you just use larger severs?",{"id":158,"text":159},"24381984","Agree, data labeling app in Django will be interesting. It will require a front-end with a lot of features to make it usable.",{"commenters":161,"max_depth":35,"maker_replies":151,"first_comment_mins":162,"lifespan_hours":15},15,219,[164,166,167,169,172,174,175,177,181,184,189,190,191,194,195,197,201,203,204,205,208,210],[102,34,34,165,103,34],"commenter\u002Fneutral\u002Fperformance",[106,34,34,165,107,34],[49,34,34,168,11,32],"maker\u002Fneutral\u002Fidea",[170,34,34,165,171,34],"24377127","lmeyerov",[133,32,34,173,134,34],"other\u002Fneutral\u002Fnone",[155,32,34,173,11,32],[176,32,34,173,134,34],"24377239",[178,32,32,179,180,34],"24377562","project\u002Fcritical\u002Fdesign","darwinwhy",[182,32,32,179,183,34],"24379670","rajacombinator",[185,186,35,187,188,34],"24376170",2,"project\u002Fneutral\u002Fidea","denimboy",[158,186,34,168,11,32],[140,35,34,173,141,34],[192,35,34,193,11,32],"24376846","other\u002Fcritical\u002Fexecution",[126,33,34,173,127,34],[119,41,35,196,107,34],"project\u002Fneutral\u002Fdesign",[198,41,34,199,200,34],"24376026","commenter\u002Fneutral\u002Fnone","jamestimmins",[72,41,34,202,11,32],"maker\u002Fneutral\u002Fdesign",[95,151,32,179,96,34],[147,151,35,196,148,34],[206,151,35,196,207,34],"24375465","wdroz",[62,151,34,209,11,32],"project\u002Fpositive\u002Fdesign",[211,151,41,209,212,34],"24379877","mabcat",[214,217,220],{"id":215,"t":216,"points":32,"comments":34},"21627325",1574683292,{"id":218,"t":219,"points":32,"comments":34},"23700710",1593607450,{"id":4,"t":12,"points":14,"comments":15},[222,226,231,236,241,246],{"id":223,"name":224,"points":225,"category":20},"24380969","Linux Upskill Challenge",780,{"id":227,"name":228,"points":229,"category":230},"24422432","Mimestream",403,"productivity",{"id":232,"name":233,"points":234,"category":235},"24381700","Talk",310,"consumer_social",{"id":237,"name":238,"points":239,"category":240},"24407706","Titanoboa",279,"dev_tools",{"id":242,"name":243,"points":244,"category":245},"24370296","typing",237,"creative",{"id":247,"name":248,"points":249,"category":250},"24363493","kiss-orm",220,"languages",14,false,"v2",{"id":255,"name":5,"line":6,"ai":252,"cat":20,"year":13,"points":14,"comments":15,"rec":29,"s":256,"top":18,"kw":257,"maker":11,"domain":10,"tier":19,"attempts":35,"strip":258,"url":9,"mix":259,"praise":86,"objection":91,"sub":21},24373459,-0.18,[24,25,26,27,28],"0000000113000030013305",[32,33,34,35],1794036595589]