diff --git a/api/followups.py b/api/followups.py index e767b9c..7553e5e 100644 --- a/api/followups.py +++ b/api/followups.py @@ -3,7 +3,7 @@ from typing import List from urllib.parse import quote import requests -SIMILARITY_THRESHOLD = 0.5 # total shot in the dark - play with this later +SIMILARITY_THRESHOLD = 0.4 # bit of a shot in the dark - play with this later MAX_FOLLOWUPS = 3 @dataclass diff --git a/web/src/pages/index.tsx b/web/src/pages/index.tsx index 687d66a..0c5e853 100644 --- a/web/src/pages/index.tsx +++ b/web/src/pages/index.tsx @@ -426,6 +426,21 @@ const Home: NextPage = () => { return <> })} + {(() => { + if (loadState.state === "idle") { + return
{ + loadState.followups.map((followup, i) => { + return
  • + +
  • + }) + }
    + } + return <>; + })()} + {(() => { diff --git a/web/src/searchbox.tsx b/web/src/searchbox.tsx index 9b4e7dd..20e09b8 100644 --- a/web/src/searchbox.tsx +++ b/web/src/searchbox.tsx @@ -22,7 +22,7 @@ const SearchBox: React.FC<{search: ( if (loading) return <>; return (<> -
    { + { e.preventDefault(); search(query, setQuery, setLoading); }}>