Update app.py
Browse files
app.py
CHANGED
@@ -74,8 +74,11 @@ if uploaded_file is not None:
|
|
74 |
# Read the contents of the uploaded database file in binary mode
|
75 |
db_content = uploaded_file.read()
|
76 |
|
77 |
-
#
|
78 |
-
|
|
|
|
|
|
|
79 |
|
80 |
# Display a success message after uploading the database file
|
81 |
st.success("Database uploaded successfully.")
|
|
|
74 |
# Read the contents of the uploaded database file in binary mode
|
75 |
db_content = uploaded_file.read()
|
76 |
|
77 |
+
# Decode binary data into a Unicode string
|
78 |
+
db_content_str = db_content.decode("utf-8")
|
79 |
+
|
80 |
+
# Execute the script
|
81 |
+
cursor.executescript(db_content_str)
|
82 |
|
83 |
# Display a success message after uploading the database file
|
84 |
st.success("Database uploaded successfully.")
|