Patrick Ramos commited on
Commit
5df45f9
1 Parent(s): 42ef8c0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -1,11 +1,13 @@
1
  import gradio as gr
2
- from transformers import ViTFeatureExtractor, ViTModel
3
  import torch
4
- import matplotlib.pyplot as plt
5
  from skops import hub_utils
6
  from einops import reduce
 
7
  import seaborn as sns
 
8
  import pickle
 
9
 
10
  labels = [
11
  'tench',
@@ -26,7 +28,7 @@ feature_extractor = ViTFeatureExtractor.from_pretrained('facebook/dino-vitb16')
26
  model = ViTModel.from_pretrained('facebook/dino-vitb16').eval().to(device)
27
 
28
  # load logistic regression
29
- !mkdir emb-gam-dino
30
  hub_utils.download(repo_id='Ramos-Ramos/emb-gam-dino', dst='emb-gam-dino')
31
 
32
  with open('emb-gam-dino/model.pkl', 'rb') as file:
 
1
  import gradio as gr
 
2
  import torch
3
+ from transformers import ViTFeatureExtractor, ViTModel
4
  from skops import hub_utils
5
  from einops import reduce
6
+ import matplotlib.pyplot as plt
7
  import seaborn as sns
8
+
9
  import pickle
10
+ import os
11
 
12
  labels = [
13
  'tench',
 
28
  model = ViTModel.from_pretrained('facebook/dino-vitb16').eval().to(device)
29
 
30
  # load logistic regression
31
+ os.mkdir('emb-gam-dino')
32
  hub_utils.download(repo_id='Ramos-Ramos/emb-gam-dino', dst='emb-gam-dino')
33
 
34
  with open('emb-gam-dino/model.pkl', 'rb') as file: