Skip to content

Commit

Permalink
chore: disable the Detect feature temporarily to minimise server load
Browse files Browse the repository at this point in the history
  • Loading branch information
Garee committed Jul 29, 2023
1 parent 2e8795f commit 9c00ad4
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions app/src/components/detect-modal/detect-modal.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import {
Alert,
AlertIcon,
AlertTitle,

Check warning on line 4 in app/src/components/detect-modal/detect-modal.tsx

View workflow job for this annotation

GitHub Actions / build (14.x)

'AlertTitle' is defined but never used

Check warning on line 4 in app/src/components/detect-modal/detect-modal.tsx

View workflow job for this annotation

GitHub Actions / build (16.x)

'AlertTitle' is defined but never used
AlertDescription,
Box,
Button,
Center,
Expand All @@ -17,7 +21,7 @@ import {
SliderTrack,
Stack,
Text,
useToast,
useToast
} from "@chakra-ui/react";
import React, { FC, useRef, useState } from "react";

Expand All @@ -29,7 +33,7 @@ export interface DetectModalProps {
export const DetectModal: FC<DetectModalProps> = ({ isOpen, onClose }) => {
const toast = useToast();
const [loading, setLoading] = useState(false);
const [canDetect, setCanDetect] = useState(true);
const [canDetect, setCanDetect] = useState(false);
const [confidence, setConfidence] = useState(0.25);
const [hideConfidence, setHideConfidence] = useState(false);
const [hideLabels, setHideLabels] = useState(true);
Expand Down Expand Up @@ -163,6 +167,10 @@ export const DetectModal: FC<DetectModalProps> = ({ isOpen, onClose }) => {
<ModalCloseButton />
<ModalBody>
<Stack>
<Alert status='warning'>
<AlertIcon />
<AlertDescription>This feature is currently disabled to minimise server load.</AlertDescription>
</Alert>
<Text>
Try out the litter detection model by uploading your own image or
using the sample below.
Expand Down Expand Up @@ -224,7 +232,7 @@ export const DetectModal: FC<DetectModalProps> = ({ isOpen, onClose }) => {
>
Detect
</Button>
<Button onClick={onUpload} mr={3}>
<Button onClick={onUpload} isDisabled mr={3}>
Upload
</Button>
<input
Expand Down

0 comments on commit 9c00ad4

Please sign in to comment.