VinayHajare commited on
Commit
23a61b4
1 Parent(s): e10e9d9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -1,9 +1,11 @@
1
  import torch
2
  import torchvision.transforms as transforms
3
- import gadio as gr
4
  from huggingface_hub import hf_hub_download
5
  from PIL import Image
6
 
 
 
7
  Fruits = ['Acerola', 'Apple', 'Apricot', 'Avocado', 'Banana', 'Black Berry', 'Blue Berry', 'Cantaloupe', 'Cherry',
8
  'Coconut', 'Fig', 'Grapefruit', 'Grape', 'Guava', 'Kiwi Fruit', 'Lemon', 'Lime', 'Mango', 'Olive', 'Orange',
9
  'Passion Fruit', 'Peach', 'Pear', 'Pineapple', 'Plum', 'Pomegranate', 'Raspberry', 'Strawberry', 'Tomato',
@@ -17,6 +19,8 @@ model_path = hf_hub_download(repo_id = repo_name, file_name = file_name)
17
  model = torch.load(model_path).to(device)
18
  model.eval()
19
 
 
 
20
  transform = transforms.Compose([
21
  transforms.Resize(224),
22
  transforms.CenterCrop(224),
@@ -39,4 +43,6 @@ interface = gr.Interface(
39
  theme = gr.themes.soft()
40
  )
41
 
 
 
42
  interface.launch(debug = True)
 
1
  import torch
2
  import torchvision.transforms as transforms
3
+ import gradio as gr
4
  from huggingface_hub import hf_hub_download
5
  from PIL import Image
6
 
7
+ print("Stage 0: Completed")
8
+
9
  Fruits = ['Acerola', 'Apple', 'Apricot', 'Avocado', 'Banana', 'Black Berry', 'Blue Berry', 'Cantaloupe', 'Cherry',
10
  'Coconut', 'Fig', 'Grapefruit', 'Grape', 'Guava', 'Kiwi Fruit', 'Lemon', 'Lime', 'Mango', 'Olive', 'Orange',
11
  'Passion Fruit', 'Peach', 'Pear', 'Pineapple', 'Plum', 'Pomegranate', 'Raspberry', 'Strawberry', 'Tomato',
 
19
  model = torch.load(model_path).to(device)
20
  model.eval()
21
 
22
+ print("Stage 1: Completed ")
23
+
24
  transform = transforms.Compose([
25
  transforms.Resize(224),
26
  transforms.CenterCrop(224),
 
43
  theme = gr.themes.soft()
44
  )
45
 
46
+ print("Stage 2: Completed")
47
+
48
  interface.launch(debug = True)