npc0 commited on
Commit
074e304
·
verified ·
1 Parent(s): a31a058

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +2 -1
src/streamlit_app.py CHANGED
@@ -7,7 +7,7 @@ import streamlit as st
7
  import duckdb
8
 
9
  # Database file path
10
- DB_PATH = '/data/steampolis.duckdb'
11
 
12
  # Initialize database tables if they don't exist
13
  def initialize_database():
@@ -175,6 +175,7 @@ def share_wisdom(prompt, allow_skip=False):
175
  new_comment_text = st.text_area(f"Your Insight {'that different from others above (Empty to skip)' if allow_skip else ''}", key="new_comment_input")
176
  if st.button("Share Your Wisdom"):
177
  if new_comment_text:
 
178
  user_id = find_or_create_user(user_email) # Ensure user exists
179
  if user_id:
180
  local_con = None
 
7
  import duckdb
8
 
9
  # Database file path
10
+ DB_PATH = 'steampolis.duckdb'
11
 
12
  # Initialize database tables if they don't exist
13
  def initialize_database():
 
175
  new_comment_text = st.text_area(f"Your Insight {'that different from others above (Empty to skip)' if allow_skip else ''}", key="new_comment_input")
176
  if st.button("Share Your Wisdom"):
177
  if new_comment_text:
178
+ user_email = st.session_state.get('user_email', '')
179
  user_id = find_or_create_user(user_email) # Ensure user exists
180
  if user_id:
181
  local_con = None