Skip to content

Commit

Permalink
Merge pull request #9 from darwinai/bug/CNXC-389-consistent-percentages
Browse files Browse the repository at this point in the history
[CNXC-389] Change decimals to percentages with 2 digits of precision
  • Loading branch information
mslwang committed Aug 26, 2021
2 parents 5090a0c + ffa5980 commit b35ef09
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pdfgeneration/pdfgeneration.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def run(self, options):
for column_name in classification_data:
prediction = classification_data.get(column_name, 'N/A')
if (column_name != 'prediction') and (column_name != 'Prediction') and (column_name != '**DISCLAIMER**'):
prediction_analysis += f"<h3>{column_name}: <span>{prediction}</span></h3>"
prediction_analysis += f"<h3>{column_name}: <span>{float(prediction)*100:.2f}%</span></h3>"

txt = txt.replace("${PRED_ANALYSIS}", prediction_analysis)
txt = txt.replace("${X-RAY-IMAGE}", options.imagefile)
Expand Down

0 comments on commit b35ef09

Please sign in to comment.