Upload folder using huggingface_hub
Browse files- .ipynb_checkpoints/app-checkpoint.py +1 -0
- .ipynb_checkpoints/requirements-checkpoint.txt +6 -0
- app.py +1 -0
- requirements.txt +2 -1
.ipynb_checkpoints/app-checkpoint.py
CHANGED
@@ -2,6 +2,7 @@
|
|
2 |
import gradio as gr
|
3 |
from transformers import pipeline
|
4 |
import numpy as np
|
|
|
5 |
age_classifier = pipeline("image-classification", model="nateraw/vit-age-classifier")
|
6 |
emotion_classifier = pipeline("image-classification", model="jhoppanne/Image-Emotion-Classification")
|
7 |
def pred_age_emotion(input_image):
|
|
|
2 |
import gradio as gr
|
3 |
from transformers import pipeline
|
4 |
import numpy as np
|
5 |
+
from PIL import Image
|
6 |
age_classifier = pipeline("image-classification", model="nateraw/vit-age-classifier")
|
7 |
emotion_classifier = pipeline("image-classification", model="jhoppanne/Image-Emotion-Classification")
|
8 |
def pred_age_emotion(input_image):
|
.ipynb_checkpoints/requirements-checkpoint.txt
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Python 3.10.14
|
2 |
+
gradio==4.25.0
|
3 |
+
transformers==4.37.2
|
4 |
+
torch
|
5 |
+
numpy
|
6 |
+
pillow==10.3.0
|
app.py
CHANGED
@@ -2,6 +2,7 @@
|
|
2 |
import gradio as gr
|
3 |
from transformers import pipeline
|
4 |
import numpy as np
|
|
|
5 |
age_classifier = pipeline("image-classification", model="nateraw/vit-age-classifier")
|
6 |
emotion_classifier = pipeline("image-classification", model="jhoppanne/Image-Emotion-Classification")
|
7 |
def pred_age_emotion(input_image):
|
|
|
2 |
import gradio as gr
|
3 |
from transformers import pipeline
|
4 |
import numpy as np
|
5 |
+
from PIL import Image
|
6 |
age_classifier = pipeline("image-classification", model="nateraw/vit-age-classifier")
|
7 |
emotion_classifier = pipeline("image-classification", model="jhoppanne/Image-Emotion-Classification")
|
8 |
def pred_age_emotion(input_image):
|
requirements.txt
CHANGED
@@ -2,4 +2,5 @@
|
|
2 |
gradio==4.25.0
|
3 |
transformers==4.37.2
|
4 |
torch
|
5 |
-
numpy
|
|
|
|
2 |
gradio==4.25.0
|
3 |
transformers==4.37.2
|
4 |
torch
|
5 |
+
numpy
|
6 |
+
pillow==10.3.0
|