Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -64,7 +64,9 @@ def process_queries(query_text, uploaded_file):
|
|
| 64 |
queries = []
|
| 65 |
|
| 66 |
if uploaded_file is not None:
|
| 67 |
-
|
|
|
|
|
|
|
| 68 |
queries = [q.strip() for q in sqlparse.split(content) if q.strip()]
|
| 69 |
elif query_text and query_text.strip():
|
| 70 |
queries = [query_text.strip()]
|
|
|
|
| 64 |
queries = []
|
| 65 |
|
| 66 |
if uploaded_file is not None:
|
| 67 |
+
with open(uploaded_file.name, "r", encoding="utf-8") as f:
|
| 68 |
+
content = f.read()
|
| 69 |
+
#content = uploaded_file.read().decode("utf-8")
|
| 70 |
queries = [q.strip() for q in sqlparse.split(content) if q.strip()]
|
| 71 |
elif query_text and query_text.strip():
|
| 72 |
queries = [query_text.strip()]
|