Welcome to the MindsDB Playground repository! This project is a web application that leverages the power of MindsDB to perform various natural language processing (NLP) tasks, such as text summarization, sentiment analysis, translation, spam detection, and more. The app provides a user-friendly interface to interact with these functionalities, making it a versatile tool for text analysis and data predictions.
You can access the live demo of the application here: MindsDB Playground
- Text Summarization: Generate concise summaries from input text.
- Sentiment Analysis: Determine the sentiment (positive, negative, neutral) of the text.
- Translation: Translate text between different languages.
- Spam Detection: Detect whether the input text is spam.
- JSON Extraction: Extract structured JSON data from unstructured text.
- Q&A: Answer questions based on the input text.
- ESG Analysis: Determine the ESG (Environmental, Social, Governance) type of the text.
- Industry Classification: Classify the industry type from the input text.
- Mobile Price Prediction: Predict mobile phone prices.
- Ethereum Price Forecast: Forecast Ethereum prices.
- Water Quality Analysis: Determine the potability of water.
- Tesla Stock Prediction: Predict Tesla stock prices.
To run the MindsDB Playground locally, follow these steps:
-
Clone the repository:
-
git clone https://github.com/Rutam21/mindsdb-playground.git cd mindsdb-playground
-
Install dependencies: Ensure you have Node.js installed, then run:
npm install
-
Set up environment variables:
Create a
.env
file in the root directory and add your environment variables based on the.env.example
file. For example:MINDSDB_API_KEY=your_mindsdb_api_key ... ... ...
-
Run the application:
npm start
The application will start on
http://localhost:3000
.
Open your browser and navigate to http://localhost:3000
. You will see the home page of the MindsDB Playground where you can interact with various NLP tools provided by MindsDB.
The application provides several API endpoints for different NLP tasks. Below is a summary of the available endpoints, including the required input parameters and response formats:
Endpoint: POST /summarize
Input:
{
"inputText": "Text to summarize",
"selectedEngine": "Engine to use"
}
Response:
{
"summary": "Generated summary",
"selectedEngine": "Engine used"
}
Endpoint: POST /analyze
Input:
{
"inputText": "Text to analyze",
"selectedEngine": "Engine to use"
}
Response:
{
"prediction": "Sentiment analysis result",
"selectedEngine": "Engine used"
}
Endpoint: POST /translate
Input:
{
"inputText": "Text to translate",
"selectedEngine": "Engine to use",
"choice": "Language to translate to"
}
Response:
{
"translation": "Translated text",
"selectedEngine": "Engine used"
}
Endpoint: POST /spam
Input:
{
"inputText": "Text to check for spam",
"selectedEngine": "Engine to use"
}
Response:
{
"status": "Spam status",
"selectedEngine": "Engine used"
}
Endpoint: POST /json
Input:
{
"inputText": "Text to extract JSON from",
"selectedEngine": "Engine to use"
}
Response:
{
"json": "Extracted JSON",
"selectedEngine": "Engine used"
}
Endpoint: POST /qna
Input:
{
"inputText": "Text to generate questions and answers",
"selectedEngine": "Engine to use"
}
Response:
{
"answer": "Generated answer",
"selectedEngine": "Engine used"
}
Endpoint: POST /esg
Input:
{
"inputText": "Text to analyze for ESG",
"selectedEngine": "Engine to use"
}
Response:
{
"esgType": "Determined ESG type",
"selectedEngine": "Engine used"
}
Endpoint: POST /industry
Input:
{
"inputText": "Text to classify industry",
"selectedEngine": "Engine to use"
}
Response:
{
"industry": "Classified industry type",
"selectedEngine": "Engine used"
}
Endpoint: POST /findPrice
Input:
{
"inputText": "Text to predict mobile price",
"selectedEngine": "Engine to use"
}
Response:
{
"price": "Predicted mobile price",
"selectedEngine": "Engine used"
}
Endpoint: POST /findEthPrice
Input:
{
"inputText": "Text to forecast Ethereum price",
"selectedEngine": "Engine to use"
}
Response:
{
"price": "Forecasted Ethereum price",
"selectedEngine": "Engine used"
}
Endpoint: POST /getQuality
Input:
{
"inputText": "Text to analyze water quality",
"selectedEngine": "Engine to use"
}
Response:
{
"potability": "Determined water potability",
"selectedEngine": "Engine used"
}
Endpoint: POST /findTeslaStocks
Input:
{
"inputText": "Text to predict Tesla stock price",
"selectedEngine": "Engine to use"
}
Response:
{
"stock": "Predicted Tesla stock price",
"selectedEngine": "Engine used"
}
Endpoint: GET /download/:filename
Input Action: Click on the ⬇️ button available in the top left corner of each section to download the instruction guide on how to train a MindsDB model for that particular section.
Response: The requested PDF file will be downloaded.
We welcome contributions to enhance the MindsDB Playground. To contribute:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Make your changes.
- Commit your changes (
git commit -m 'Add new feature'
). - Push to the branch (
git push origin feature-branch
). - Open a pull request.
Please ensure your contributions adhere to the coding standards and pass all tests.
This project is licensed under the Apache 2.0 License. See the LICENSE file for details.
Thank you for using the MindsDB Playground! If you have any questions or feedback, feel free to open an issue or contact us. Happy coding!