Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -2,7 +2,11 @@
|
|
2 |
from PIL import Image
|
3 |
import gradio as gr
|
4 |
from ultralytics import YOLO
|
|
|
5 |
|
|
|
|
|
|
|
6 |
|
7 |
# Load your trained model
|
8 |
model = YOLO('best.pt')
|
@@ -52,6 +56,9 @@ platform = gr.Interface( fn = predict,
|
|
52 |
description="""
|
53 |
Introducing a revolutionary computer-aided detection tool designed to enhance the efficiency of clinicians in detecting pneumothorax in chest X-ray images.
|
54 |
""",
|
|
|
|
|
|
|
55 |
article = """
|
56 |
It is crucial to emphasize that while this tool serves as a valuable research aid,
|
57 |
it is not intended to replace clinical guidelines,
|
|
|
2 |
from PIL import Image
|
3 |
import gradio as gr
|
4 |
from ultralytics import YOLO
|
5 |
+
import os
|
6 |
|
7 |
+
## Where to store flagged data
|
8 |
+
HF_TOKEN = os.getenv('HF_TOKEN')
|
9 |
+
hf_writer = gr.HuggingFaceDatasetSaver(HF_TOKEN, "Crowd-sourced images")
|
10 |
|
11 |
# Load your trained model
|
12 |
model = YOLO('best.pt')
|
|
|
56 |
description="""
|
57 |
Introducing a revolutionary computer-aided detection tool designed to enhance the efficiency of clinicians in detecting pneumothorax in chest X-ray images.
|
58 |
""",
|
59 |
+
allow_flagging="manual",
|
60 |
+
flagging_options=["Wrong detection", "Ambiguous", "Other"],
|
61 |
+
flagging_callback=hf_writer,
|
62 |
article = """
|
63 |
It is crucial to emphasize that while this tool serves as a valuable research aid,
|
64 |
it is not intended to replace clinical guidelines,
|