b2u commited on
Commit
603d158
·
1 Parent(s): 4b117ce

fixing prediction

Browse files
Files changed (1) hide show
  1. model.py +2 -2
model.py CHANGED
@@ -225,7 +225,7 @@ Category:"""
225
  "choices": [best_choice]
226
  }
227
  }],
228
- "model_version": self.get("model_version", "1.0.0")
229
  }
230
  logger.info(f"Formatted prediction: {json.dumps(prediction, indent=2)}")
231
  predictions.append(prediction)
@@ -235,7 +235,7 @@ Category:"""
235
  raise
236
 
237
  logger.info(f"Returning {len(predictions)} predictions")
238
- return predictions # Changed from ModelResponse to match Label Studio's expectation
239
 
240
  def fit(self, event, data, **kwargs):
241
  """Fine-tune the model using LoRA when new annotations are available"""
 
225
  "choices": [best_choice]
226
  }
227
  }],
228
+ "model_version": "1.0.0"
229
  }
230
  logger.info(f"Formatted prediction: {json.dumps(prediction, indent=2)}")
231
  predictions.append(prediction)
 
235
  raise
236
 
237
  logger.info(f"Returning {len(predictions)} predictions")
238
+ return predictions
239
 
240
  def fit(self, event, data, **kwargs):
241
  """Fine-tune the model using LoRA when new annotations are available"""