haxerwddle commited on
Commit
be350ef
·
1 Parent(s): 3b56279

UI change

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -27,8 +27,8 @@ def classify_image(image):
27
 
28
 
29
  # ------------------ LOAD FLAN-T5 ------------------
30
- tokenizer = T5Tokenizer.from_pretrained("google/flan-t5-large")
31
- chat_model = T5ForConditionalGeneration.from_pretrained("google/flan-t5-large")
32
 
33
  def explain_recycling(class_label):
34
  prompt = f"""
@@ -66,7 +66,7 @@ def explain_recycling(class_label):
66
  top_p=0.9,
67
  )
68
 
69
- return tokenizer.decode(outputs[0]).replace("<pad>", "").replace("</s>", "")
70
 
71
 
72
  # ------------------ PIPELINE ------------------
 
27
 
28
 
29
  # ------------------ LOAD FLAN-T5 ------------------
30
+ tokenizer = T5Tokenizer.from_pretrained("google/flan-t5-base")
31
+ chat_model = T5ForConditionalGeneration.from_pretrained("google/flan-t5-base")
32
 
33
  def explain_recycling(class_label):
34
  prompt = f"""
 
66
  top_p=0.9,
67
  )
68
 
69
+ return tokenizer.decode(outputs[0])
70
 
71
 
72
  # ------------------ PIPELINE ------------------