Battu007 commited on
Commit
7079f36
1 Parent(s): c5e39dc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -6,10 +6,12 @@ import gradio as gr
6
 
7
  from transformers import AutoTokenizer, pipeline, AutoModelForTokenClassification
8
 
9
- tokenizer = AutoTokenizer.from_pretrained("Battu007/1_Image_Classification")
10
- model = AutoModelForTokenClassification.from_pretrained("Battu007/1_Image_Classification")
11
 
 
12
 
 
13
 
14
  def predict_image(opened_image):
15
  img_array = tf.keras.utils.img_to_array(opened_image)
 
6
 
7
  from transformers import AutoTokenizer, pipeline, AutoModelForTokenClassification
8
 
9
+ #tokenizer = AutoTokenizer.from_pretrained("Battu007/1_Image_Classification")
10
+ #model = AutoModelForTokenClassification.from_pretrained("Battu007/1_Image_Classification")
11
 
12
+ class_names = ['daisy', 'dandelion', 'roses', 'sunflowers', 'tulips']
13
 
14
+ model = tf.keras.models.load_model()
15
 
16
  def predict_image(opened_image):
17
  img_array = tf.keras.utils.img_to_array(opened_image)