Spaces:
Running
Running
Update app.py and reqs
Browse files- app.py +4 -4
- requirements.txt +1 -1
app.py
CHANGED
@@ -3,11 +3,11 @@ import torch
|
|
3 |
from ultralytics import YOLO
|
4 |
|
5 |
torch.hub.download_url_to_file(
|
6 |
-
'
|
7 |
torch.hub.download_url_to_file(
|
8 |
-
'https://
|
9 |
torch.hub.download_url_to_file(
|
10 |
-
'https://
|
11 |
|
12 |
|
13 |
def handle_classify(image: gr.inputs.Image = None):
|
@@ -29,7 +29,7 @@ def handle_classify(image: gr.inputs.Image = None):
|
|
29 |
|
30 |
print(top5)
|
31 |
|
32 |
-
return top5
|
33 |
|
34 |
|
35 |
inputs = [
|
|
|
3 |
from ultralytics import YOLO
|
4 |
|
5 |
torch.hub.download_url_to_file(
|
6 |
+
'http://www.imesclub.org/images/stories/arabidentity.jpeg', 'one.jpg')
|
7 |
torch.hub.download_url_to_file(
|
8 |
+
'https://lp-cms-production.imgix.net/2023-08/GettyImages-1224548888-16.9.jpg', 'two.jpg')
|
9 |
torch.hub.download_url_to_file(
|
10 |
+
'https://s.wsj.net/public/resources/images/OB-EQ974_diwali_G_20091014112400.jpg', 'three.jpg')
|
11 |
|
12 |
|
13 |
def handle_classify(image: gr.inputs.Image = None):
|
|
|
29 |
|
30 |
print(top5)
|
31 |
|
32 |
+
return "\n".join(["\t".join(row) for row in top5])
|
33 |
|
34 |
|
35 |
inputs = [
|
requirements.txt
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
torch
|
2 |
-
gradio
|
3 |
ultralytics
|
|
|
1 |
torch
|
2 |
+
gradio==4.14.0
|
3 |
ultralytics
|