Downloads · 30 days
0
lunaopenlabs/LunaAi
LunaAi is a text classification model from lunaopenlabs. Use it when you need a label for a piece of text. It is set up for adapter-transformers. The card lists the license as mit.
Luna AI is an open-source AI model developed by Luna OpenLabs for text classification tasks. Leveraging the BERT architecture, this model is designed to classify text into predefined categories efficiently and accurat…
Downloads · 30 days
0
Access
Public
Updated Oct 27, 2024
Repo size
—
Likes
0
Public
Click a slice to open those files.
.csv87.4 KB · 90%
From the Hugging Face model README
Luna AI is an open-source AI model developed by Luna OpenLabs for text classification tasks. Leveraging the BERT architecture, this model is designed to classify text into predefined categories efficiently and accurately.
To clone the repository, run the following command:
bash git clone https://github.com/LunaOpenLabs/Luna-Ai.git
To install the required packages, use:
bash pip install -r requirements.txt
Luna AI requires a dataset in CSV format with two columns: text and label. An example dataset is provided in the data/ directory.
Here’s an example of how the dataset should be structured:
csv text,label "I love this product!",1 "This is the worst experience.",0
Training the Model
To train the model, execute the following command:
bash python training/train.py
This command will load the dataset from data/dataset.csv and initiate the training process.
After training, save the trained model using:
bash python save_model.py
This will save the model and its tokenizer in the luna_ai_model directory.
To test the model with sample inputs, you can use the test_model.py script. Modify the sample_text variable in the script as needed.
bash python test_model.py
The model will output the predicted class for the provided sample text.
Contributions are welcome! If you have suggestions, improvements, or bug fixes, please follow these steps:
Fork the repository. Create a new branch (git checkout -b feature-branch). Make your changes and commit them (git commit -m 'Add some feature'). Push to the branch (git push origin feature-branch). Open a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
For questions, suggestions, or feedback, feel free to contact the Luna OpenLabs team at [[email protected]].