Skip to content

Commit

Permalink
Merge branch 'feature/implement-streaming-in-frontend'
Browse files Browse the repository at this point in the history
  • Loading branch information
Antonwy committed Jul 9, 2024
2 parents af6fe30 + 7f0f78d commit f2a5632
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 1 deletion.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
Expand Down
40 changes: 40 additions & 0 deletions frontend/lib/image-classification.types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
type ClassificationDataType = {
unknown: any;
'model-producer': {
model: string;
producer: string;
};
'producer-url': {
title: string;
link: string;
};
'retail-price-details': {
producer_url: string;
price: number;
original_name: string;
description: string;
material: string;
specs: string;
};
'estimated-price': {
price: number;
certainty: string;
min_range: number;
max_range: number;
};
'second-hand-offers': {
link: string;
price: number;
wear: string;
}[];
};

export type ClassificationProductDescription = keyof ClassificationDataType;

export type ClassificationProduct<
T extends ClassificationProductDescription = ClassificationProductDescription
> = {
data: ClassificationDataType[T];
data_description: T;
data_type: string;
};
6 changes: 6 additions & 0 deletions frontend/lib/utils.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { type ClassValue, clsx } from "clsx"
import { twMerge } from "tailwind-merge"

export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs))
}

0 comments on commit f2a5632

Please sign in to comment.