Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -95,6 +95,9 @@ def predict(image: PIL.Image.Image, score_threshold: float,
|
|
95 |
def main():
|
96 |
args = parse_args()
|
97 |
|
|
|
|
|
|
|
98 |
|
99 |
model = load_model()
|
100 |
labels = load_labels()
|
@@ -113,6 +116,7 @@ def main():
|
|
113 |
label='Score Threshold'),
|
114 |
],
|
115 |
['text', gr.outputs.Label(label='Output')],
|
|
|
116 |
title=TITLE,
|
117 |
description=DESCRIPTION,
|
118 |
theme=args.theme,
|
|
|
95 |
def main():
|
96 |
args = parse_args()
|
97 |
|
98 |
+
image_paths = load_sample_image_paths()
|
99 |
+
examples = [[path.as_posix(), args.score_threshold]
|
100 |
+
for path in image_paths]
|
101 |
|
102 |
model = load_model()
|
103 |
labels = load_labels()
|
|
|
116 |
label='Score Threshold'),
|
117 |
],
|
118 |
['text', gr.outputs.Label(label='Output')],
|
119 |
+
examples=examples,
|
120 |
title=TITLE,
|
121 |
description=DESCRIPTION,
|
122 |
theme=args.theme,
|