DaviLima commited on
Commit
cb9ee2f
1 Parent(s): 5d8204d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -33,7 +33,6 @@ def preprocess_text(text):
33
  # Converter para letras minúsculas
34
  text = text.lower()
35
  return text
36
-
37
  def generate_predictions(text):
38
  sentences = text.split(".")
39
  sentences = [preprocess_text(sentence) for sentence in sentences]
@@ -52,9 +51,10 @@ def generate_predictions(text):
52
 
53
  # Make predictions
54
  sentence_prediction = predict(loaded_model, input_loader)[0]
55
- predictions.append(sentence_prediction)
56
 
57
- return predictions
 
58
 
59
 
60
  # Specify the device as CPU
 
33
  # Converter para letras minúsculas
34
  text = text.lower()
35
  return text
 
36
  def generate_predictions(text):
37
  sentences = text.split(".")
38
  sentences = [preprocess_text(sentence) for sentence in sentences]
 
51
 
52
  # Make predictions
53
  sentence_prediction = predict(loaded_model, input_loader)[0]
54
+ predictions.append(f"{sentence}: {sentence_prediction}")
55
 
56
+ predictions_html = "<br>".join(predictions)
57
+ return predictions_html
58
 
59
 
60
  # Specify the device as CPU