Commit ·
4e4eaba
1
Parent(s): 5534bd2
Update app.py
Browse files
app.py
CHANGED
|
@@ -29,8 +29,8 @@ def yolov8_inference(
|
|
| 29 |
|
| 30 |
# observe results
|
| 31 |
top_class_index = torch.argmax(results[0].probs).item()
|
| 32 |
-
|
| 33 |
-
|
| 34 |
|
| 35 |
|
| 36 |
inputs = [
|
|
@@ -42,7 +42,7 @@ inputs = [
|
|
| 42 |
gr.Slider(minimum=0.0, maximum=1.0, default=0.45, step=0.05, label="IOU Threshold"),
|
| 43 |
]
|
| 44 |
|
| 45 |
-
outputs = gr.
|
| 46 |
title = "AI-Powered Tire Quality Inspection: YOLOv8s Enhanced Classification"
|
| 47 |
|
| 48 |
|
|
@@ -54,7 +54,7 @@ Welcome to our 🤖 AI-Powered Tire Quality Inspection Space – a cutting-edge
|
|
| 54 |
About This Space: """
|
| 55 |
This interactive platform empowers you to classify tires with unparalleled precision, utilizing a fine-tuned YOLOv8s model 🎯 specifically developed for identifying defects in tire manufacturing. By submitting an image of a tire, you can instantly determine whether it meets the rigorous quality standards required in the industry, helping to ensure safety and reliability in automotive products.
|
| 56 |
"""
|
| 57 |
-
examples = [['
|
| 58 |
demo_app = gr.Interface(
|
| 59 |
fn=yolov8_inference,
|
| 60 |
inputs=inputs,
|
|
|
|
| 29 |
|
| 30 |
# observe results
|
| 31 |
top_class_index = torch.argmax(results[0].probs).item()
|
| 32 |
+
Class1 = model.names[top_class_index]
|
| 33 |
+
globals(Class1)
|
| 34 |
|
| 35 |
|
| 36 |
inputs = [
|
|
|
|
| 42 |
gr.Slider(minimum=0.0, maximum=1.0, default=0.45, step=0.05, label="IOU Threshold"),
|
| 43 |
]
|
| 44 |
|
| 45 |
+
outputs = gr.Text(Class1)
|
| 46 |
title = "AI-Powered Tire Quality Inspection: YOLOv8s Enhanced Classification"
|
| 47 |
|
| 48 |
|
|
|
|
| 54 |
About This Space: """
|
| 55 |
This interactive platform empowers you to classify tires with unparalleled precision, utilizing a fine-tuned YOLOv8s model 🎯 specifically developed for identifying defects in tire manufacturing. By submitting an image of a tire, you can instantly determine whether it meets the rigorous quality standards required in the industry, helping to ensure safety and reliability in automotive products.
|
| 56 |
"""
|
| 57 |
+
examples = [['Sample/Bald tyre.jpg', 'Tyre-Quality-Classification-AI', 640, 0.25, 0.45], ['Sample/Good tyre.png', 'Tyre-Quality-Classification-AI', 640, 0.25, 0.45]]
|
| 58 |
demo_app = gr.Interface(
|
| 59 |
fn=yolov8_inference,
|
| 60 |
inputs=inputs,
|