Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ import gradio as gr
|
|
5 |
|
6 |
# Load model and processor from local "model" folder
|
7 |
model = AutoModelForImageClassification.from_pretrained("model")
|
8 |
-
|
9 |
labels = model.config.id2label # e.g., {0: "non-hateful", 1: "hateful"}
|
10 |
|
11 |
def classify_meme(image: Image.Image):
|
|
|
5 |
|
6 |
# Load model and processor from local "model" folder
|
7 |
model = AutoModelForImageClassification.from_pretrained("model")
|
8 |
+
processor = AutoProcessor.from_pretrained("model",use_fast = False)
|
9 |
labels = model.config.id2label # e.g., {0: "non-hateful", 1: "hateful"}
|
10 |
|
11 |
def classify_meme(image: Image.Image):
|