Adonai Vera commited on
Commit
c6d54f2
·
1 Parent(s): 1c60c96

Test with token

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -2,9 +2,12 @@ from turtle import title
2
  import gradio as gr
3
  from transformers import pipeline
4
  from PIL import Image
 
 
 
5
 
6
  # Initialize the pipeline with your model
7
- pipe = pipeline("image-classification", model="SubterraAI/ofwat_cleaner_classification")
8
 
9
  def classify_image(image):
10
  # Convert the input image to PIL format
 
2
  import gradio as gr
3
  from transformers import pipeline
4
  from PIL import Image
5
+ import os
6
+
7
+ HF_TOKEN = os.environ.get('HF_TOKEN')
8
 
9
  # Initialize the pipeline with your model
10
+ pipe = pipeline("image-classification", model="SubterraAI/ofwat_cleaner_classification", token=HF_TOKEN)
11
 
12
  def classify_image(image):
13
  # Convert the input image to PIL format