Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions apps/computer-vision/app/classification/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { useState } from 'react';
import { View, Text, StyleSheet, ScrollView, Platform } from 'react-native';
import { commonStyles, ColorPalette } from '../../theme';
import { useSafeAreaInsets } from 'react-native-safe-area-context';
import { commonStyles, ColorPalette, theme } from '../../theme';
import { useImage } from '@shopify/react-native-skia';
import { useClassifier, models } from 'react-native-executorch';
import ScreenWrapper from '../../components/ScreenWrapper';
Expand Down Expand Up @@ -28,6 +29,7 @@ const MODEL_OPTIONS: ModelOption[] = [
];

function ClassificationContent() {
const insets = useSafeAreaInsets();
const [selectedModel, setSelectedModel] = useState<any>(MODEL_OPTIONS[0].value);
const [imageUri, setImageUri] = useState<string | null>(null);
const [isProcessing, setIsProcessing] = useState(false);
Expand Down Expand Up @@ -97,7 +99,10 @@ function ClassificationContent() {
return (
<ScrollView
style={commonStyles.container}
contentContainerStyle={commonStyles.contentContainer}
contentContainerStyle={[
commonStyles.contentContainer,
{ paddingBottom: insets.bottom + theme.spacing.large },
]}
>
<Text style={commonStyles.description}>
Upload or capture an image to identify objects using a classifier.
Expand Down