dennisjooo commited on
Commit
a5e5a54
1 Parent(s): 55bf0aa

Remove `torch` from import

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -1,10 +1,9 @@
1
  # Importing some modules
2
  import gradio as gr
3
  from transformers import pipeline
4
- import torch.cuda as cuda
5
 
6
  # Loading in the model
7
- MODEL = pipeline('image-classification', model='nateraw/vit-age-classifier', device=0 if cuda.is_available() else -1)
8
 
9
  # Main function to classify image
10
  def classify_image(image, top_k):
 
1
  # Importing some modules
2
  import gradio as gr
3
  from transformers import pipeline
 
4
 
5
  # Loading in the model
6
+ MODEL = pipeline('image-classification', model='nateraw/vit-age-classifier', device=-1)
7
 
8
  # Main function to classify image
9
  def classify_image(image, top_k):