Spaces:
Build error
Build error
Upload app.py
Browse files
app.py
CHANGED
|
@@ -35,7 +35,7 @@ def predict(image_input):
|
|
| 35 |
return f"Predicted Class: {predicted_class} (Confidence: {prediction:.5f})"
|
| 36 |
|
| 37 |
# Hugging Face Model Repository ID
|
| 38 |
-
REPO_ID = "skngew/9053220B" #
|
| 39 |
|
| 40 |
# Load the model
|
| 41 |
model = load_model(REPO_ID)
|
|
@@ -45,6 +45,7 @@ student_id = "Student ID: 9053220B"
|
|
| 45 |
|
| 46 |
# Markdown description to show classification threshold
|
| 47 |
threshold_info = """
|
|
|
|
| 48 |
### Classification Threshold:
|
| 49 |
- A tyre is classified as **Good** if the confidence score is **≥ 0.5**.
|
| 50 |
- A tyre is classified as **Defective** if the confidence score is **< 0.5**.
|
|
@@ -58,7 +59,7 @@ interface = gr.Interface(
|
|
| 58 |
title="Binary Classification: Good vs. Defective Tire",
|
| 59 |
description=student_id,
|
| 60 |
allow_flagging="never",
|
| 61 |
-
examples=[], #
|
| 62 |
)
|
| 63 |
|
| 64 |
# Add the threshold information markdown
|
|
|
|
| 35 |
return f"Predicted Class: {predicted_class} (Confidence: {prediction:.5f})"
|
| 36 |
|
| 37 |
# Hugging Face Model Repository ID
|
| 38 |
+
REPO_ID = "skngew/9053220B" # my actual repo ID
|
| 39 |
|
| 40 |
# Load the model
|
| 41 |
model = load_model(REPO_ID)
|
|
|
|
| 45 |
|
| 46 |
# Markdown description to show classification threshold
|
| 47 |
threshold_info = """
|
| 48 |
+
### EfficientNetB0 (Feature Extraction)
|
| 49 |
### Classification Threshold:
|
| 50 |
- A tyre is classified as **Good** if the confidence score is **≥ 0.5**.
|
| 51 |
- A tyre is classified as **Defective** if the confidence score is **< 0.5**.
|
|
|
|
| 59 |
title="Binary Classification: Good vs. Defective Tire",
|
| 60 |
description=student_id,
|
| 61 |
allow_flagging="never",
|
| 62 |
+
examples=[], #Can add examples here
|
| 63 |
)
|
| 64 |
|
| 65 |
# Add the threshold information markdown
|