Al-mabady commited on
Commit
25d33f4
·
verified ·
1 Parent(s): 9179365

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -8,7 +8,7 @@ import random
8
 
9
  # Load model from Hugging Face
10
  repo_id = "Al-mabady/beauty_detector"
11
- model_path = hf_hub_download(repo_id=repo_id, filename="model_full_max.pth")
12
 
13
  # Load the model
14
  model = torch.load(model_path, map_location=torch.device("cpu"), weights_only=False)
@@ -39,10 +39,10 @@ def predict(image):
39
  'Is it hot in here or is that just you?','Señorita','daddy\'s sexy slut','Wifey Cake','Your Smile is breathtaking',
40
  'are you the moon 🌑 ? ... somebody call Nasa ','Aphrodite']
41
 
42
- pc = output.item() > 0.46
43
 
44
  if pc :
45
- return f"0/10 : {random.choice(t)} "
46
  else :
47
  return f"10/10 : {random.choice(f)} {random.choice(e)}"
48
 
 
8
 
9
  # Load model from Hugging Face
10
  repo_id = "Al-mabady/beauty_detector"
11
+ model_path = hf_hub_download(repo_id=repo_id, filename="model_full_MEGA.pth")
12
 
13
  # Load the model
14
  model = torch.load(model_path, map_location=torch.device("cpu"), weights_only=False)
 
39
  'Is it hot in here or is that just you?','Señorita','daddy\'s sexy slut','Wifey Cake','Your Smile is breathtaking',
40
  'are you the moon 🌑 ? ... somebody call Nasa ','Aphrodite']
41
 
42
+ pc = output.item() > 0.27
43
 
44
  if pc :
45
+ return f"0/10 : {random.choice(t)} 🤮"
46
  else :
47
  return f"10/10 : {random.choice(f)} {random.choice(e)}"
48