Loading 'en_core_web_sm' pipeline on a deployed web app? #12773
-
Hi all! I've deployed a web app using Flask, via Railway.app. Using Github. The web app is a text anlyser. Asks for input text from the user, then analyses the text using the Python library Textstat. Spacy is in my requirements.txt file. But I'm not sure how to load/add the pipeline for visitors to the web app. Is this something that needs to be loaded every time a user comes to the web app/makes a request? If so how do I go about loading the pipeline. Or would it be better to go via an API route? This is the best help I could find on StackOverflow, but to be honest I don't really understand it as I'm fairly new to CS. Thanks guys, any advice appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi, I am not sure if I fully understand your question. Is the issue the deployment of the model with the web app? If so, you could add the model to
The |
Beta Was this translation helpful? Give feedback.
Hi, I am not sure if I fully understand your question. Is the issue the deployment of the model with the web app? If so, you could add the model to
requirements.txt
. The models are distributed as Python wheels. For example:The
spacy
dependency is not really needed here, because the model depends on thespacy
package, so it will be downloaded as a transitive dependency.