Skip to content

Commit

Permalink
resolving importing issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasgabriel18 committed Mar 5, 2024
1 parent 96e94da commit a85cf7d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
5 changes: 3 additions & 2 deletions api/DataProcesser.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from NbEmotionsModel import make_prediction
from NbLinRegressionModel import make_prediction_nblin
from available_classifiers import get_available_classifiers
from tensorflow.keras.models import load_model
from tensorflow.python.keras.models import load_model

import pandas as pd
import numpy as np
Expand All @@ -11,8 +11,9 @@
import re
import joblib
import string
from nltk.corpus import stopwords

import nltk
from nltk.corpus import stopwords
# mais imports

class DataProcesser():
Expand Down
2 changes: 1 addition & 1 deletion api/NbEmotionsModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def make_prediction(my_sentence):
pipeline = pickle.load(model_file)

# Fazendo previsões para os textos
predictions = pipeline.predict([texts])
predictions = pipeline.predict([my_sentence])

return predictions[0]

Expand Down
8 changes: 4 additions & 4 deletions api/Neural_Network2.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
import tensorflow as tf
import joblib

from tensorflow.keras import layers
from tensorflow.keras.layers import TextVectorization
from tensorflow.keras.models import Sequential
from tensorflow.python.keras import layers
from tensorflow.python.keras.layers import TextVectorization
from tensorflow.python.keras.models import Sequential
from sklearn.preprocessing import LabelEncoder
from tensorflow.keras.callbacks import Callback
from tensorflow.python.keras.callbacks import Callback

def preprocess_text(text):
text = text.lower()
Expand Down

0 comments on commit a85cf7d

Please sign in to comment.