PolarisFTL commited on
Commit
7ad209b
·
verified ·
1 Parent(s): b340955

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -1,5 +1,11 @@
1
  import gradio as gr
2
- from yolo import YOLO
 
 
 
 
 
 
3
 
4
  yolo = YOLO()
5
 
@@ -42,8 +48,6 @@ with gr.Blocks() as demo:
42
  gr.Examples(
43
  examples=example_images,
44
  inputs=img_input,
45
- outputs=output,
46
- fn=predict,
47
  )
48
 
49
 
 
1
  import gradio as gr
2
+ try:
3
+ from yolo import YOLO
4
+ yolo = YOLO()
5
+ except Exception as e:
6
+ print(f"❌ Error initializing YOLO: {e}")
7
+ yolo = None # fallback
8
+
9
 
10
  yolo = YOLO()
11
 
 
48
  gr.Examples(
49
  examples=example_images,
50
  inputs=img_input,
 
 
51
  )
52
 
53