cmckinle commited on
Commit
a032ce8
1 Parent(s): bda908c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -40,7 +40,7 @@ def aiornot(image, model_index):
40
 
41
  html_out = f"""
42
  <h1>This image is likely: {label}</h1><br><h3>
43
- Probabilites:<br>
44
  Real: {px[1][0]}<br>
45
  AI: {px[0][0]}"""
46
 
@@ -66,8 +66,8 @@ def tot_prob():
66
  fin_out = sum([result["Real"] for result in fin_sum]) / len(fin_sum)
67
  fin_sub = 1 - fin_out
68
  out = {
69
- "Real": f"{fin_out}",
70
- "AI": f"{fin_sub}"
71
  }
72
  return out
73
  except Exception as e:
 
40
 
41
  html_out = f"""
42
  <h1>This image is likely: {label}</h1><br><h3>
43
+ Probabilities:<br>
44
  Real: {px[1][0]}<br>
45
  AI: {px[0][0]}"""
46
 
 
66
  fin_out = sum([result["Real"] for result in fin_sum]) / len(fin_sum)
67
  fin_sub = 1 - fin_out
68
  out = {
69
+ "Real": f"{fin_out:.2%}",
70
+ "AI": f"{fin_sub:.2%}"
71
  }
72
  return out
73
  except Exception as e: