AMead10 commited on
Commit
2aa7929
·
1 Parent(s): f86f4f8

small bug fixes

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -29,7 +29,7 @@ db_cursor = db_connection.cursor()
29
  def get_potential_labels():
30
  # get potential labels from db
31
  potential_labels = db_cursor.execute(
32
- "SELECT message_category_name FROM message_categorys"
33
  )
34
 
35
  potential_labels = db_cursor.fetchall()
@@ -39,14 +39,12 @@ def get_potential_labels():
39
  return potential_labels
40
 
41
 
42
- # make gloabl variable for potential labels
43
- global potential_labels
44
-
45
  potential_labels = get_potential_labels()
46
 
47
 
48
  # Function to handle the classification
49
  def classify_email(constituent_email):
 
50
  potential_labels = get_potential_labels()
51
 
52
  model_out = classifier_model(constituent_email, potential_labels, multi_label=True)
 
29
  def get_potential_labels():
30
  # get potential labels from db
31
  potential_labels = db_cursor.execute(
32
+ "SELECT message_category_name FROM radmap_frog12.message_categorys"
33
  )
34
 
35
  potential_labels = db_cursor.fetchall()
 
39
  return potential_labels
40
 
41
 
 
 
 
42
  potential_labels = get_potential_labels()
43
 
44
 
45
  # Function to handle the classification
46
  def classify_email(constituent_email):
47
+ global potential_labels
48
  potential_labels = get_potential_labels()
49
 
50
  model_out = classifier_model(constituent_email, potential_labels, multi_label=True)