Adonai Vera commited on
Commit
22e3686
·
1 Parent(s): 9e12bdf

Change clean to obstruction

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -7,8 +7,7 @@ import os
7
 
8
  # Initialize the pipeline with your model
9
  pipe = pipeline("image-classification", model="SubterraAI/ofwat_cleaner_classification")
10
- HF_TOKEN = os.getenv('HF_TOKEN')
11
- hf_writer = gr.HuggingFaceDatasetSaver(HF_TOKEN, "ofwat_cleaner_loop", True, separate_dirs=True)
12
 
13
 
14
  def classify_image(image):
@@ -32,8 +31,8 @@ iface = gr.Interface(
32
  ["examples/PP.jpg"]
33
  ],
34
  description="Upload an image to view a classification demonstration leveraging the dataset/library of images collected by WRc & Unitied Utitlies during The Water Services Regulation Authority (OFWAT) Innovation Challenge – Artificial Intelligence and Sewers. Not only can you see the initial classification, but you as the user can also inform us if the classification is correct. Your response will be used to retrain this model. The team at Subterra would like to thank all of those involved in collecting this dataset as we hope that other groups will use it to further advance technology solutions for the water industry.",
35
- title="Sewer Cleaning Classification with AI by Subterra",
36
- allow_flagging="manual",
37
  flagging_options=["obstruction", "no_obstruction"],
38
  flagging_callback=hf_writer
39
 
 
7
 
8
  # Initialize the pipeline with your model
9
  pipe = pipeline("image-classification", model="SubterraAI/ofwat_cleaner_classification")
10
+ hf_writer = gr.HuggingFaceDatasetSaver(dataset_name="ofwat_cleaner_loop", private=True, separate_dirs=True)
 
11
 
12
 
13
  def classify_image(image):
 
31
  ["examples/PP.jpg"]
32
  ],
33
  description="Upload an image to view a classification demonstration leveraging the dataset/library of images collected by WRc & Unitied Utitlies during The Water Services Regulation Authority (OFWAT) Innovation Challenge – Artificial Intelligence and Sewers. Not only can you see the initial classification, but you as the user can also inform us if the classification is correct. Your response will be used to retrain this model. The team at Subterra would like to thank all of those involved in collecting this dataset as we hope that other groups will use it to further advance technology solutions for the water industry.",
34
+ title="Sewer Obstruction Classification with AI by Subterra",
35
+ allow_flagging="auto",
36
  flagging_options=["obstruction", "no_obstruction"],
37
  flagging_callback=hf_writer
38