Spaces:
Sleeping
Sleeping
add in new connection
Browse files
app.py
CHANGED
@@ -71,6 +71,15 @@ def save_data(orig_user_email, constituent_email, labels, user_response):
|
|
71 |
# subject should be "Email Classification and Response Tracking"
|
72 |
# body should be the original email
|
73 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
try:
|
75 |
print("saving first email")
|
76 |
db_cursor.execute(
|
|
|
71 |
# subject should be "Email Classification and Response Tracking"
|
72 |
# body should be the original email
|
73 |
|
74 |
+
db_connection = mysql.connector.connect(
|
75 |
+
host=db_host,
|
76 |
+
user=db_user,
|
77 |
+
password=db_pass,
|
78 |
+
database=db_name,
|
79 |
+
)
|
80 |
+
|
81 |
+
db_cursor = db_connection.cursor()
|
82 |
+
|
83 |
try:
|
84 |
print("saving first email")
|
85 |
db_cursor.execute(
|