Fix TypeScript error with proper typing
This commit is contained in:
parent
1facff9d2a
commit
619c629b6b
|
|
@ -174,11 +174,11 @@ export default function AIModerationPage() {
|
||||||
setTesting(true);
|
setTesting(true);
|
||||||
const startTime = Date.now();
|
const startTime = Date.now();
|
||||||
try {
|
try {
|
||||||
const data = {
|
const isImage = selectedType.includes('image') || selectedType === 'video';
|
||||||
|
const data: any = {
|
||||||
moderation_type: selectedType,
|
moderation_type: selectedType,
|
||||||
engine: selectedEngine,
|
engine: selectedEngine,
|
||||||
};
|
};
|
||||||
const isImage = selectedType.includes('image') || selectedType === 'video';
|
|
||||||
if (isImage) {
|
if (isImage) {
|
||||||
data.image_url = testInput; // Use the uploaded file URL
|
data.image_url = testInput; // Use the uploaded file URL
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue