Spaces:
Running
Running
Fixed length error for if N objects < topX
Browse files
general_bias_measurement.py
CHANGED
@@ -208,6 +208,8 @@ def evaluate_t2i_model_images(images, prompts, progressBar, debugging, evalType)
|
|
208 |
return (sortedDistributionBiasDict, normalisedDistribution, B_D, hallucinationBiases, CLIPMissRates, CLIPErrors)
|
209 |
def output_eval_results(metrics, evalID, topX, evalType):
|
210 |
sortedDistributionBiasList = list(metrics[0].items())
|
|
|
|
|
211 |
th_props = [
|
212 |
('font-size', '16px'),
|
213 |
('font-weight', 'bold'),
|
|
|
208 |
return (sortedDistributionBiasDict, normalisedDistribution, B_D, hallucinationBiases, CLIPMissRates, CLIPErrors)
|
209 |
def output_eval_results(metrics, evalID, topX, evalType):
|
210 |
sortedDistributionBiasList = list(metrics[0].items())
|
211 |
+
if len(sortedDistributionBiasList) < topX:
|
212 |
+
topX = len(sortedDistributionBiasList)
|
213 |
th_props = [
|
214 |
('font-size', '16px'),
|
215 |
('font-weight', 'bold'),
|