My first app, please review :)

Hi there!

I’ve just deployed successfully to Streamlit-sharing. Thanks to the lovelies @ Streamlit and the community for making this a -so much fun- exercise.

The App is spinnin’ @:
https://share.streamlit.io/sgoede/ner_pos_tag/main/NER_POS_TAG.py

The app i’ve deployed can do Named Entity Recognition (NER) and Part-of-speech tagging (POS) at once, using the terrific Flair NLP Framework from Zalando Research department in collaboration with Berlin University.

Code is available on my Github account, with under 70 lines of Python hopefully worth checking out.

Feel free to give feedback on the App. It wouldn’t be possible without the community in the first place! so you’re thoughts are most welcome.

I will write a blog with more detailed info as soon as I can find the time :slight_smile:

4 Likes

It is showing This app has gone over its resource limits. Please try again in a few minutes.
Kindly refer this for checking the previous post which had similar issue hopefully it will help you.

Thanks for your reply.

Long story short: the app uses 2 saved .pt (Torch) models. It runs locally just fine, however the recursive nature of Streamlit proved to be causing a memory leak, since every time a new input is given, a new model instance is loaded in the RAM.
I simply didn’t notice on my laptop, since i have quite a lot of RAM. However, I did end up crashing my laptop just as well, it only took quite some time.

Thanks to the community, SessionState.py has now been added and a cached version does prevent this unexpected behaviour.

It is still far from perfect, so please try again an let me now your honest feedback :slight_smile:

Thanks

3 Likes

The link is working now. I tried your project. It is amazing and works fine. However, I am not an expert to the related field but even a small initiative should be appreciated as you tried something out of your comfort zone.

1 Like

Hello

It seems to work :slight_smile: Maybe put an explanation of the codes?

And why the dollar sign?

1 Like

Thank you for your feedback.
In order to answer your question:

spacy.explain("PRP$")
pronoun, possessive

Furthermore,
Functional documentation of the models used can be reviewed @ the links below (still thinking how to integrate this nicely in the App, suggestions are most welcome)

NER: flair/ner-english · Hugging Face
POS: Chapter 5 Parts-of-Speech Tagging | Corpus Linguistics (Second column in section 5.2)

1 Like

Nice app. Looking forwards to your article sharing to know more about the development details.

Look great, could you explain how you managed to the set file to XLSX only?

Edit:
Nevermind, found it!

I’ve updated the App to accommodate Streamlit >= 1.8. Since I had the code under review in over a year, I also did some updating . Firstly as FlairNLP improved the Tagger functionality, it also supports Span tagging. Really useful if you have complex documents, that can easily have multiple spans of meaning across sentences.

Secondly I’ve received user feedback that the abbreviations where not clear, hence that’s fixed as well, input taken from the revised modelcards @HuggingFace.

If you care to take a look and share you’re thoughts, that would be awesome.

Source Code (Free to use):