Dileep7729 commited on
Commit
bdea63d
·
verified ·
1 Parent(s): 36ab993

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -1,5 +1,6 @@
1
  import gradio as gr
2
  from transformers import CLIPModel, CLIPProcessor
 
3
 
4
  # Step 1: Load Fine-Tuned Model from Hugging Face Model Hub
5
  model_name = "quadranttechnologies/retail-content-safety-clip-finetuned"
@@ -21,7 +22,7 @@ def classify_image(image):
21
  Classify an image as 'safe' or 'unsafe' and return probabilities.
22
 
23
  Args:
24
- image (PIL.Image.Image): The uploaded image.
25
 
26
  Returns:
27
  str: Predicted category ("safe" or "unsafe").
@@ -105,5 +106,6 @@ if __name__ == "__main__":
105
 
106
 
107
 
 
108
 
109
 
 
1
  import gradio as gr
2
  from transformers import CLIPModel, CLIPProcessor
3
+ from PIL import Image
4
 
5
  # Step 1: Load Fine-Tuned Model from Hugging Face Model Hub
6
  model_name = "quadranttechnologies/retail-content-safety-clip-finetuned"
 
22
  Classify an image as 'safe' or 'unsafe' and return probabilities.
23
 
24
  Args:
25
+ image (PIL.Image.Image): Uploaded image.
26
 
27
  Returns:
28
  str: Predicted category ("safe" or "unsafe").
 
106
 
107
 
108
 
109
+
110
 
111