Skip to content

Commit

Permalink
fix error when running classifications on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
aromberg committed Aug 22, 2024
1 parent 569ec9d commit c11ee12
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/xspect/fastapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,16 @@ def classify(genus: str, file: str, meta: bool = False, step: int = 500):
path = get_xspect_upload_path() / file

pipeline = Pipeline(genus + " classification", "Test Author", "[email protected]")
species_execution = ModelExecution(genus + "-species", sparse_sampling_step=step)
species_execution = ModelExecution(
genus.lower() + "-species", sparse_sampling_step=step
)
if meta:
species_filtering_step = PipelineStep(
StepType.FILTERING, genus, 0.7, species_execution
)
genus_execution = ModelExecution(genus + "-genus", sparse_sampling_step=step)
genus_execution = ModelExecution(
genus.lower() + "-genus", sparse_sampling_step=step
)
genus_execution.add_pipeline_step(species_filtering_step)
pipeline.add_pipeline_step(genus_execution)
else:
Expand Down

0 comments on commit c11ee12

Please sign in to comment.