srinidhidevaraj commited on
Commit
b0f0c39
·
verified ·
1 Parent(s): 0f58395

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
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
- content = uploaded_file.read().decode("utf-8")
 
 
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()]