How to Build Your Own Multilingual Symptom-Disease Classification App with Sytora

Sep 25, 2023 | Data Science

Welcome to the world of Sytora! A venture that dives into the intricacies of medical classification using symptoms as a gateway to disorders. This multilingual app harnesses the power of data-driven methodologies by employing a multinomial Naive Bayes classifier, translating data through the UMLS coding standard, and providing a reliable means of disease prediction. Ready to step into the realm of medical data science? Let’s get started!

Getting Started

Follow these steps to set up Sytora on your local machine:

  • Clone the Repository: Start by cloning the Sytora repository to your local environment.
  • Install Requirements: Execute the installation of necessary dependencies.
  • Run Scripts: Execute the essential scripts (as described below) and npm dependencies.
  • UMLS License: Acquire a UMLS license to download UMLS lexica and generate the DB (using umls.sh).
  • Run the Local Server: Open your browser and check http://localhost:5001.
  • Done! Celebrate your successful setup with a little dance! 🎉

Understanding the Code: An Analogy

Imagine you are a chef at a bustling restaurant, trying to prepare a grand feast by mixing multiple ingredients to create unique dishes. Here’s how each script in Sytora functions within our culinary analogy:

  • cui2vec-converter.py: Think of this as your sous-chef that converts raw ingredients (symptoms) into a gourmet format (GloVe embeddings). You need to arm yourself with the right spices (pretrained embeddings) found at Figshare.
  • generateLabels.py: This is like a kitchen planner, organizing all labels for your dishes (language options) so you have everything at hand when creating meals for your diners.
  • train.py: The head chef steps in here, training the Naive Bayes classifier as though crafting a secret recipe for disease prediction that will wow any customer with its accuracy.
  • relatedSymptoms.py: This is like your creative assistant responsible for coming up with suggestions based on the current menu (symptoms), ensuring diners have plenty of options.

Flask Service

Next, you will run a small Flask application that showcases the trained models:

  • Navigate to the flaskapp directory and start the app using:
  • bash
        python app.py
        

Deployment Made Simple

Follow these short commands to have your app up and running in no time:

bash
sudo apt update
sudo apt install python3-pip python3-dev build-essential libssl-dev libffi-dev python3-setuptools
sudo apt install python-pip python-dev
sudo apt install nodejs npm
pip install flask pandas sklearn numpy
pip install Flask-Limiter flask-expects-json
pip install more-itertools requests configparser
sudo apt-get install nginx supervisor
git clone https://github.com/leandermesytora
cd sytora/flaskapp
npm install
etc...

Troubleshooting Your Setup

Facing issues? Here are some troubleshooting tips:

  • Ensure that all dependencies are correctly installed using the provided pip and npm commands.
  • Double-check if the UMLS database is correctly placed in the right directory.
  • If the server is not running, verify your Flask setup and make sure you referenced the correct paths.
  • For any ongoing issues, feel free to reach out. For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.

Final Thoughts

At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.

Now dive into Sytora and start making sense of symptoms with this innovative tool! Happy coding!

Stay Informed with the Newest F(x) Insights and Blogs

Tech News and Blog Highlights, Straight to Your Inbox