ethix commited on
Commit
24e07c9
·
1 Parent(s): f0208ec

Fix ViT-5 model prediction output and logging

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -201,9 +201,9 @@ def predict_image(img, confidence_threshold):
201
 
202
  try:
203
  prediction_5 = clf_5(img_pilvits)
204
- result_5 = {pred['label']: pred['score'] for pred in prediction_2}
205
  result_5output = [5, 'ViT-base Newcomer', result_5['Realism'], result_5['Deepfake']]
206
- print(result_2output)
207
  # Ensure the result dictionary contains all class names
208
  for class_name in class_names_5:
209
  if class_name not in result_5:
 
201
 
202
  try:
203
  prediction_5 = clf_5(img_pilvits)
204
+ result_5 = {pred['label']: pred['score'] for pred in prediction_5}
205
  result_5output = [5, 'ViT-base Newcomer', result_5['Realism'], result_5['Deepfake']]
206
+ print(result_5output)
207
  # Ensure the result dictionary contains all class names
208
  for class_name in class_names_5:
209
  if class_name not in result_5: