Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -72,7 +72,7 @@ def gradio_interface():
|
|
| 72 |
# annotations_file = random.choice([f for f in os.listdir(example_dir) if f.endswith('.json')])
|
| 73 |
annotations_file_path = os.path.join(selected_example_dir_path, "reading_annotation.json")
|
| 74 |
annotations = load_annotations(annotations_file_path)
|
| 75 |
-
annotated_images = render_annotations(annotations,
|
| 76 |
return [gr.Image(value=image[0], label=image[1]) for image in annotated_images]
|
| 77 |
|
| 78 |
# Create Gradio interface
|
|
|
|
| 72 |
# annotations_file = random.choice([f for f in os.listdir(example_dir) if f.endswith('.json')])
|
| 73 |
annotations_file_path = os.path.join(selected_example_dir_path, "reading_annotation.json")
|
| 74 |
annotations = load_annotations(annotations_file_path)
|
| 75 |
+
annotated_images = render_annotations(annotations, selected_example_dir_path)
|
| 76 |
return [gr.Image(value=image[0], label=image[1]) for image in annotated_images]
|
| 77 |
|
| 78 |
# Create Gradio interface
|