Alamgirapi commited on
Commit
61a5785
·
verified ·
1 Parent(s): 64da85e

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +47 -1
README.md CHANGED
@@ -16,4 +16,50 @@ short_description: Streamlit template space
16
  Edit `/src/streamlit_app.py` to customize this app to your heart's desire. :heart:
17
 
18
  If you have any questions, checkout our [documentation](https://docs.streamlit.io) and [community
19
- forums](https://discuss.streamlit.io).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  Edit `/src/streamlit_app.py` to customize this app to your heart's desire. :heart:
17
 
18
  If you have any questions, checkout our [documentation](https://docs.streamlit.io) and [community
19
+ forums](https://discuss.streamlit.io).
20
+ # No Code Text Classifier Tool
21
+
22
+ This tool will help you to perform training, evaluation & prediction of Text Classification task without knowing any kind of code. You have to define the dataset directory and create your model and perform predictions without any issue. In the backend, this will automatically perform text preprocessing, model training etc. You can also perform hyperparameter techniques to get the best model through experiments. Let's get started.
23
+
24
+ Install the pakage
25
+ ```python
26
+ pip install NoCodeTextClassifier
27
+ ```
28
+
29
+ ### Training the Text Classification
30
+
31
+ Define the datapath
32
+ ```python
33
+ data_path = "dataset.csv"
34
+ ```
35
+ Clean the Text dataset and transform the label into number
36
+ ```python
37
+ # It will take datapath, text feature and target feature
38
+ process = process(data_path,'email','class')
39
+ df = process.processing()
40
+ print(df.head())
41
+ ```
42
+ Convert the text feature into numerical vector. You can apply multiple vectorization such as TfIdfVectorizer, CountVectorizer.
43
+ ```python
44
+ Vectorization = Vectorization(df,'clean_text')
45
+ TfidfVectorizer = Vectorization.TfidfVectorizer(max_features= 10000)
46
+ print(TfidfVectorizer.toarray())
47
+ ```
48
+ Split the dataset into training and testing
49
+ ```python
50
+ X_train, X_test, y_train, y_test = process.split_data(TfidfVectorizer.toarray(), df['labeled_target'])
51
+ print(X_train.shape, X_test.shape, y_train.shape, y_test.shape)
52
+ ```
53
+ Perform training with various models such as Naive Bayers, Decision Tree, Logistic Regression, and others. After training, you will see the evalution of the trained model.
54
+ ```python
55
+ models = Models(X_train=X_train,X_test = X_test, y_train = y_train, y_test = y_test)
56
+ models.DecisionTree()
57
+ ```
58
+
59
+ ### For Inferencing with text data
60
+
61
+ For prediction of the text data with the trained model, try this.
62
+ ```python
63
+ text = input("Enter your text:\n")
64
+ inference.prediction(text)
65
+ ```