Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
from ultralytics import YOLO
|
| 3 |
+
import tensorflow
|
| 4 |
+
|
| 5 |
+
|
| 6 |
+
with gr.Blocks() as demo:
|
| 7 |
+
gr.Markdown("# Lung Cancer Classifier")
|
| 8 |
+
gr.Markdown("## Image Examples")
|
| 9 |
+
gr.Examples(
|
| 10 |
+
examples=[os.path.join(os.path.dirname(__file__), "lung01.jpg"),
|
| 11 |
+
os.path.join(os.path.dirname(__file__), "lung02.jpg"),
|
| 12 |
+
os.path.join(os.path.dirname(__file__), "lung03.jpg")
|
| 13 |
+
],
|
| 14 |
+
inputs=inp_img,
|
| 15 |
+
outputs=out_txt,
|
| 16 |
+
fn=image_classifier,
|
| 17 |
+
cache_examples=True,
|
| 18 |
+
)
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
demo.launch()
|