Skip to content

Commit

Permalink
Lint code [WEB-2934]
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhiltri committed Dec 19, 2024
1 parent ec52cb9 commit 4afd084
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions app/Console/Commands/AI/AnalyzeAllArtworks.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ public function handle(): int

$artworks = $this->getArtworksToProcess($cutoffDate);
$total = $artworks->count();

if ($total === 0) {
$this->info("No artworks need processing at this time.");
return 0;
}

$this->info("Found {$total} artworks to process");
$bar = $this->output->createProgressBar($total);

$processed = 0;
$skipped = 0;
$errors = 0;
Expand All @@ -69,12 +69,12 @@ public function handle(): int
'trace' => $e->getTraceAsString()
]);
}

$bar->advance();
}

$bar->finish();

$this->newLine(2);
$this->table(
['Metric', 'Count'],
Expand Down Expand Up @@ -221,4 +221,4 @@ protected function saveTextEmbeddings(
]
);
}
}
}
6 changes: 3 additions & 3 deletions app/Console/Commands/AI/SummarizeDescription.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ public function handle(): int

try {
// Get artwork and embeddings
$artwork = $this->option('random')
$artwork = $this->option('random')
? $this->getRandomArtwork()
: Artwork::findOrFail($this->option('id') ?? $this->ask('Enter artwork ID:'));

$imageEmbedding = ImageEmbedding::where('model_name', 'artworks')
->where('model_id', $artwork->id)
->first();

$textEmbedding = TextEmbedding::where('model_name', 'artworks')
->where('model_id', $artwork->id)
->first();
Expand Down Expand Up @@ -176,4 +176,4 @@ protected function saveResults($artwork, $imageEmbedding, $textEmbedding, $newSu
file_put_contents($filename, json_encode($data, JSON_PRETTY_PRINT));
$this->info("\nResults saved to: " . $filename);
}
}
}

0 comments on commit 4afd084

Please sign in to comment.