Skip to content

Commit

Permalink
Merge branch 'blakeblackshear:dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
weitheng authored Nov 1, 2024
2 parents 59f1c67 + e5ebf93 commit 63d5b97
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 8 deletions.
1 change: 1 addition & 0 deletions frigate/object_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ def detect_raw(self, tensor_input: np.ndarray):

if self.dtype == InputDTypeEnum.float:
tensor_input = tensor_input.astype(np.float32)
tensor_input /= 255

return self.detect_api.detect_raw(tensor_input=tensor_input)

Expand Down
8 changes: 6 additions & 2 deletions web/src/components/overlay/detail/SearchDetailDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,9 @@ function ObjectSnapshotTab({
onSubmitToPlus(false);
}}
>
This is a {search?.label}
This is{" "}
{/^[aeiou]/i.test(search?.label || "") ? "an" : "a"}{" "}
{search?.label}
</Button>
<Button
className="text-white"
Expand All @@ -666,7 +668,9 @@ function ObjectSnapshotTab({
onSubmitToPlus(true);
}}
>
This is not a {search?.label}
This is not{" "}
{/^[aeiou]/i.test(search?.label || "") ? "an" : "a"}{" "}
{search?.label}
</Button>
</>
)}
Expand Down
6 changes: 4 additions & 2 deletions web/src/components/overlay/dialog/FrigatePlusDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ export function FrigatePlusDialog({
onSubmitToPlus(false);
}}
>
This is a {upload?.label}
This is {/^[aeiou]/i.test(upload?.label || "") ? "an" : "a"}{" "}
{upload?.label}
</Button>
<Button
className="text-white"
Expand All @@ -155,7 +156,8 @@ export function FrigatePlusDialog({
onSubmitToPlus(true);
}}
>
This is not a {upload?.label}
This is not {/^[aeiou]/i.test(upload?.label || "") ? "an" : "a"}{" "}
{upload?.label}
</Button>
</>
)}
Expand Down
4 changes: 3 additions & 1 deletion web/src/pages/Explore.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,9 @@ export default function Explore() {
searchTerm={searchTerm}
searchFilter={searchFilter}
searchResults={searchResults}
isLoading={(isLoadingInitialData || isLoadingMore) ?? true}
isLoading={
(isLoadingInitialData || isLoadingMore || isValidating) ?? true
}
hasMore={!isReachingEnd}
columns={gridColumns}
defaultView={defaultView}
Expand Down
5 changes: 2 additions & 3 deletions web/src/views/search/SearchView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -397,11 +397,10 @@ export default function SearchView({
</div>
)}

{uniqueResults?.length == 0 &&
isLoading &&
{isLoading &&
(searchTerm ||
(searchFilter && Object.keys(searchFilter).length !== 0)) && (
<ActivityIndicator className="absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2" />
<ActivityIndicator className="absolute left-1/2 top-1/2 z-50 -translate-x-1/2 -translate-y-1/2 rounded-2xl bg-background/80 p-3 dark:bg-background/50" />
)}

{uniqueResults && (
Expand Down

0 comments on commit 63d5b97

Please sign in to comment.