Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
import gradio as gr
|
2 |
import torch
|
3 |
import torch.nn.functional as F
|
@@ -47,6 +48,7 @@ for example_name in examples_names:
|
|
47 |
examples.append(example)
|
48 |
np.random.shuffle(examples) # shuffle
|
49 |
|
|
|
50 |
def predict(input_image:Image.Image, true_label:str):
|
51 |
"""Predict the label of the input_image"""
|
52 |
face = mtcnn(input_image)
|
|
|
1 |
+
import spaces
|
2 |
import gradio as gr
|
3 |
import torch
|
4 |
import torch.nn.functional as F
|
|
|
48 |
examples.append(example)
|
49 |
np.random.shuffle(examples) # shuffle
|
50 |
|
51 |
+
@spaces.GPU
|
52 |
def predict(input_image:Image.Image, true_label:str):
|
53 |
"""Predict the label of the input_image"""
|
54 |
face = mtcnn(input_image)
|