Simple Web App for NLP DL Model

I’ve almost completed my DL models for an NLP project. Now I want to make a web app.

I created models in PyTorch to detect propaganda text fragments in news articles. The models have poor performance. But given a news article, they can return offsets & labels for each offset (in a text file), identifying the type of propaganda in each span of text.

Now I want to build a prototype Web app to demo this project with following minimal requirements:

  1. User provides articles (upload text file or provide link for online blog/article)
  2. System highlights all detected fragments. On hovering over each, a tooltip displays the label (propaganda technique name classifier gives a label to each span).
  3. Display bar or pie charts to show frequency of each propaganda type in the provided articles. And the propaganda percentage found in each article.
    Can you please suggest a python framework with which I can build a minimal prototype in the shortest possible time? Something that I can learn in a few days. I’m thinking of trying it out on StreamLit Can anybody guide me whether Flask, StreamLit or Django will be better, coz I have a deadline & need to build a simple web app by learning any new framework.

That’s not a PyTorch question, so you might won’t get the right answers here.

Having said that, you can expose the functionality of your models via an API. For example, I use Falcon for that. Your API has to offer at least one endpoint to upload the content (e.g., /upload) that

  • listens to uploaded text files or links
  • processes the content (e.g., making a prediction using your trained models)
  • returns all the data needed to visualize the results

The you can build any kinde of Web frontend that uses the API. But again, I’m not a Web developer, and this is the wrong forum for this type of question :).