Skip to content

Commit

Permalink
Patch
Browse files Browse the repository at this point in the history
  • Loading branch information
EndermanPC committed Feb 9, 2024
1 parent 7913e37 commit 0b1c87e
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 11 deletions.
Binary file added database/censorship.db
Binary file not shown.
Binary file added database/search-index.db
Binary file not shown.
7 changes: 0 additions & 7 deletions log.txt
Original file line number Diff line number Diff line change
@@ -1,7 +0,0 @@
SYS: Loaded: users-account.db
SYS: Initializer Database: search-index.db
SYS: Initializer Censorship Database: censorship.db
SYS: Create Users Account Database: users-account.db
SYS: Start Server: 2024-02-08 18:24:56
SYS: Loaded: users-account.db
SYS: Loaded: search-index.db
3 changes: 2 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from initializer.loader import database_loader
from manager.manager import *
from search.index import Search_Data
from streamlit_searchbox import st_searchbox

conn = database_loader()

Expand All @@ -15,7 +16,7 @@
AForm = st.session_state.form_state

with col1:
keyword = st.text_input('Try to search something!', value='Try to search something!', placeholder='Try to search something!', label_visibility='collapsed')
keyword = st.text_input('Try to search something!', placeholder='Try to search something!', label_visibility='collapsed')

with col2:
submitted1 = st.form_submit_button('Search')
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
email_validator
streamlit-searchbox
streamlit
requests
bs4
Binary file modified search/__pycache__/index.cpython-312.pyc
Binary file not shown.
2 changes: 0 additions & 2 deletions search/index.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import streamlit as st
import sqlite3

def Search_Data(conn, keyword):
cursor = conn.cursor()
Expand All @@ -8,7 +7,6 @@ def Search_Data(conn, keyword):
WHERE information_fts MATCH ?''', (keyword,))

rows = cursor.fetchall()
conn.close()

if len(rows) == 0:
st.write("No results found")
Expand Down

0 comments on commit 0b1c87e

Please sign in to comment.