Update README.md
Browse files
README.md
CHANGED
@@ -78,7 +78,7 @@ import requests
|
|
78 |
# --- Configuration ---
|
79 |
# This is the repository ID for the model on the Hugging Face Hub
|
80 |
REPO_ID = "syntheticbot/clip-face-expression"
|
81 |
-
FILENAME = "
|
82 |
DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
|
83 |
|
84 |
# The class names must be in alphabetical order as used during training
|
@@ -117,9 +117,9 @@ model.eval()
|
|
117 |
|
118 |
# --- Run Prediction on an Example Image ---
|
119 |
# Example image from the web
|
120 |
-
url = "https://upload.wikimedia.org/wikipedia/commons/thumb/
|
121 |
try:
|
122 |
-
image = Image.open(requests.get(url, stream=True).raw).convert("RGB")
|
123 |
except Exception as e:
|
124 |
print(f"Could not load image from URL: {e}")
|
125 |
exit()
|
|
|
78 |
# --- Configuration ---
|
79 |
# This is the repository ID for the model on the Hugging Face Hub
|
80 |
REPO_ID = "syntheticbot/clip-face-expression"
|
81 |
+
FILENAME = "model.safetensors"
|
82 |
DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
|
83 |
|
84 |
# The class names must be in alphabetical order as used during training
|
|
|
117 |
|
118 |
# --- Run Prediction on an Example Image ---
|
119 |
# Example image from the web
|
120 |
+
url = "https://upload.wikimedia.org/wikipedia/commons/thumb/9/9d/Carol_Burnett_1958.JPG/250px-Carol_Burnett_1958.JPG"
|
121 |
try:
|
122 |
+
image = Image.open(requests.get(url, stream=True,verify=False).raw).convert("RGB")
|
123 |
except Exception as e:
|
124 |
print(f"Could not load image from URL: {e}")
|
125 |
exit()
|