Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -4,6 +4,11 @@ import streamlit as st
|
|
4 |
server_ports = []
|
5 |
client_ports = []
|
6 |
|
|
|
|
|
|
|
|
|
|
|
7 |
# Inicjalizacja danych w st.session_state
|
8 |
if "server_ports" not in st.session_state:
|
9 |
st.session_state['server_ports'] = ""
|
|
|
4 |
server_ports = []
|
5 |
client_ports = []
|
6 |
|
7 |
+
db = sqlite3.connect('chat-hub.db')
|
8 |
+
cursor = db.cursor()
|
9 |
+
cursor.execute('CREATE TABLE IF NOT EXISTS messages (id INTEGER PRIMARY KEY AUTOINCREMENT, sender TEXT, message TEXT, timestamp TEXT)')
|
10 |
+
db.commit()
|
11 |
+
|
12 |
# Inicjalizacja danych w st.session_state
|
13 |
if "server_ports" not in st.session_state:
|
14 |
st.session_state['server_ports'] = ""
|