Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Am I going about this wrong?
#1
I have a Flask Web Service.

In one of the POST methods, I read and build a SVC classifier. It works! Hurray.

----

What I was thinking was that in another POST method (TBD) I would just do predictions on the already-built classifier from the first method -- so I wouldn't need to build the model every time.

However, I'm not sure the method where I build the model is still there after the return. I'm thinking it may be since this is a web service, not a regular method, but I'm not sure.

Assuming the model is still around in the original method after it returns a 'model built' message to the user, how would I access the model variables from another POST method? Would I need to declare them "global" in the first method?

Would appreciate suggestions on how to best set this up.

Thanks!
Reply


Messages In This Thread
Am I going about this wrong? - by Oliver - Feb-27-2018, 04:31 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Django serving wrong template at the wrong address with malformed urls.py (redactor a Drone4four 2 2,593 Aug-17-2020, 01:09 PM
Last Post: Drone4four

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020