Remove unnecessary code and extra newlines
Browse files
app.py
CHANGED
@@ -6,7 +6,6 @@ import gradio as gr
|
|
6 |
|
7 |
model = torch.hub.load('pytorch/vision:v0.6.0', 'resnet18', pretrained=True).eval()
|
8 |
|
9 |
-
|
10 |
# Download human-readable labels for ImageNet.
|
11 |
response = requests.get("https://git.io/JJkYN")
|
12 |
labels = response.text.split("\n")
|
@@ -25,8 +24,12 @@ demo = gr.Interface(
|
|
25 |
outputs=gr.Label(num_top_classes=3),
|
26 |
examples=["lion.jpg", "cheetah.jpg"])
|
27 |
|
28 |
-
# if __name__ == "__main__":
|
29 |
-
|
30 |
demo.launch(
|
31 |
# show_api=True, share=True
|
32 |
-
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
|
7 |
model = torch.hub.load('pytorch/vision:v0.6.0', 'resnet18', pretrained=True).eval()
|
8 |
|
|
|
9 |
# Download human-readable labels for ImageNet.
|
10 |
response = requests.get("https://git.io/JJkYN")
|
11 |
labels = response.text.split("\n")
|
|
|
24 |
outputs=gr.Label(num_top_classes=3),
|
25 |
examples=["lion.jpg", "cheetah.jpg"])
|
26 |
|
|
|
|
|
27 |
demo.launch(
|
28 |
# show_api=True, share=True
|
29 |
+
)
|
30 |
+
|
31 |
+
|
32 |
+
|
33 |
+
|
34 |
+
|
35 |
+
|