Spaces:
Runtime error
Runtime error
Commit ·
2d11ad8
1
Parent(s): 5788858
Update app.py
Browse files
app.py
CHANGED
|
@@ -91,12 +91,12 @@ demo1 = gr.Interface(
|
|
| 91 |
def show_incorrect(num_examples=10):
|
| 92 |
result = list()
|
| 93 |
for i in range(num_examples):
|
| 94 |
-
j = np.random.randint(
|
| 95 |
image = np.asarray(Image.open(f'misclassified-images/{j}.jpg'))
|
| 96 |
-
actual = classes[wrong_img.loc[j].at["actual"]]
|
| 97 |
-
predicted = classes[wrong_img.loc[j].at["predicted"]]
|
| 98 |
|
| 99 |
-
result.append((image, f"{actual} / {predicted}"))
|
| 100 |
|
| 101 |
return result
|
| 102 |
|
|
|
|
| 91 |
def show_incorrect(num_examples=10):
|
| 92 |
result = list()
|
| 93 |
for i in range(num_examples):
|
| 94 |
+
j = np.random.randint(1,wrong_img_no)
|
| 95 |
image = np.asarray(Image.open(f'misclassified-images/{j}.jpg'))
|
| 96 |
+
actual = classes[wrong_img.loc[j-1].at["actual"]]
|
| 97 |
+
predicted = classes[wrong_img.loc[j-1].at["predicted"]]
|
| 98 |
|
| 99 |
+
result.append((image, f"Act:{actual} / Pre:{predicted}"))
|
| 100 |
|
| 101 |
return result
|
| 102 |
|