Skip to content

Commit 623ede8

Browse files
committed
chore: remove dead code
1 parent 51387de commit 623ede8

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

  • apps/computer-vision/app/text_to_image

apps/computer-vision/app/text_to_image/index.tsx

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,13 @@ export default function TextToImageScreen() {
3737
const [inferenceStepIdx, setInferenceStepIdx] = useState<number>(0);
3838
const [image, setImage] = useState<string | null>(null);
3939
const [steps, setSteps] = useState<number>(40);
40-
40+
4141
const [input, setInput] = useState('');
4242
const [selectedModel, setSelectedModel] = useState<TextToImageModelSources>(
4343
BK_SDM_TINY_VPRED_256
4444
);
4545
const [generationTime, setGenerationTime] = useState<number | null>(null);
4646

47-
const [showTextInput, setShowTextInput] = useState(false);
4847
const [keyboardVisible, setKeyboardVisible] = useState(false);
4948
const [error, setError] = useState<string | null>(null);
5049
const [imageTitle, setImageTitle] = useState<string | null>(null);
@@ -80,9 +79,9 @@ export default function TextToImageScreen() {
8079

8180
const runForward = async () => {
8281
if (!input.trim()) return;
83-
82+
8483
setImageTitle(input);
85-
84+
8685
try {
8786
const start = Date.now();
8887
const output = await model.generate(input, imageSize, steps);
@@ -109,18 +108,17 @@ export default function TextToImageScreen() {
109108
}
110109

111110
return (
112-
<TouchableWithoutFeedback
111+
<TouchableWithoutFeedback
113112
onPress={() => {
114113
Keyboard.dismiss();
115-
setShowTextInput(false);
116114
}}
117115
>
118116
<KeyboardAvoidingView
119117
style={styles.container}
120118
behavior={Platform.OS === 'ios' ? 'padding' : undefined}
121119
>
122120
{keyboardVisible && <View style={styles.overlay} />}
123-
121+
124122
<ErrorBanner message={error} onDismiss={() => setError(null)} />
125123

126124
<View style={styles.titleContainer}>
@@ -296,4 +294,4 @@ const styles = StyleSheet.create({
296294
alignItems: 'center',
297295
justifyContent: 'center',
298296
},
299-
});
297+
});

0 commit comments

Comments
 (0)