Update app.py
Browse files
app.py
CHANGED
@@ -65,6 +65,7 @@ st.header("chat with your sql database")
|
|
65 |
|
66 |
input=st.text_input("enter your input/question ")
|
67 |
|
|
|
68 |
uploaded = st.file_uploader("Upload SQLite Database", type=["db"])
|
69 |
|
70 |
connection = sqlite3.connect(":memory:") # Use in-memory database
|
@@ -78,7 +79,7 @@ submit=st.button("submit")
|
|
78 |
|
79 |
|
80 |
|
81 |
-
if submit and
|
82 |
query=gemini_sql_query(prompt,input)
|
83 |
response=read_sql_query(query,uploaded)
|
84 |
print(query)
|
|
|
65 |
|
66 |
input=st.text_input("enter your input/question ")
|
67 |
|
68 |
+
#uploaded file
|
69 |
uploaded = st.file_uploader("Upload SQLite Database", type=["db"])
|
70 |
|
71 |
connection = sqlite3.connect(":memory:") # Use in-memory database
|
|
|
79 |
|
80 |
|
81 |
|
82 |
+
if submit and uploaded and input:
|
83 |
query=gemini_sql_query(prompt,input)
|
84 |
response=read_sql_query(query,uploaded)
|
85 |
print(query)
|