Spaces:
Sleeping
Sleeping
alejandro
commited on
Commit
·
7df1f40
1
Parent(s):
4255a03
feat: add gui
Browse files- .gitignore +1 -0
- src/app.py +18 -0
.gitignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
.env
|
src/app.py
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import streamlit as st
|
| 2 |
+
|
| 3 |
+
st.set_page_config(initial_sidebar_state="expanded", page_title="Chat with a MySQL Database", page_icon=":speech_balloon:")
|
| 4 |
+
|
| 5 |
+
with st.sidebar:
|
| 6 |
+
st.title("Chat with a MySQL Database")
|
| 7 |
+
st.write("This is a simple chat application allows you to chat with a MySQL database.")
|
| 8 |
+
|
| 9 |
+
st.text_input("Host", key="name")
|
| 10 |
+
st.text_input("Port", key="port")
|
| 11 |
+
st.text_input("Username", key="username")
|
| 12 |
+
st.text_input("Password", key="password")
|
| 13 |
+
st.text_input("Database", key="database")
|
| 14 |
+
|
| 15 |
+
user_query = st.chat_input("Type a message...")
|
| 16 |
+
|
| 17 |
+
if user_query != "":
|
| 18 |
+
pass
|