From 87bcd95e843db4bf3b8e1591f6fab31301465b07 Mon Sep 17 00:00:00 2001 From: procrastimax Date: Wed, 12 Jul 2023 15:09:12 +0200 Subject: [PATCH 1/2] Changes default nav page to intro --- app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.py b/app.py index fc029d2..4c0fba7 100644 --- a/app.py +++ b/app.py @@ -43,7 +43,7 @@ app_ui = ui.page_navbar( ), align="right", ), - selected="search_engine", + selected="intro", fluid=False, title=ui.div(ui.img(src="favicon.ico", width="75dpi", height="75dpi"), ui.h1("Copbird")), From a7453d11d5ea893681fd5d633eb5b3993e7d65d7 Mon Sep 17 00:00:00 2001 From: procrastimax Date: Wed, 12 Jul 2023 17:25:41 +0200 Subject: [PATCH 2/2] Fixes error when not finding any tweets --- src/mod_searchable.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mod_searchable.py b/src/mod_searchable.py index bea73a2..3ba4c34 100644 --- a/src/mod_searchable.py +++ b/src/mod_searchable.py @@ -58,7 +58,7 @@ def search_query(query: str, limit: int = 5, sorting_method: str = "score") -> ( result = tweets.iloc[correct_indices] if not len(result): - return None + return None, 0 if limit == -1: limit = len(result)