Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -8,8 +8,8 @@ import os
|
|
8 |
import contextlib
|
9 |
from transformers import ViTForImageClassification
|
10 |
|
11 |
-
# Suppress warnings related to the model weights initialization
|
12 |
-
warnings.filterwarnings("ignore", category=UserWarning,
|
13 |
warnings.filterwarnings("ignore", category=FutureWarning, module="torch")
|
14 |
|
15 |
# Suppress output for copying files and verbose model initialization messages
|
@@ -66,7 +66,6 @@ demo_app = gr.Interface(
|
|
66 |
outputs=outputs,
|
67 |
title="Sugarcane Disease Detection",
|
68 |
examples=EXAMPLES,
|
69 |
-
cache_example=True,
|
70 |
live=True,
|
71 |
theme="huggingface"
|
72 |
)
|
@@ -74,3 +73,4 @@ demo_app = gr.Interface(
|
|
74 |
demo_app.launch(debug=True, enable_queue=True)
|
75 |
|
76 |
|
|
|
|
8 |
import contextlib
|
9 |
from transformers import ViTForImageClassification
|
10 |
|
11 |
+
# Suppress warnings related to the model weights initialization
|
12 |
+
warnings.filterwarnings("ignore", category=UserWarning, message=".*weights.*")
|
13 |
warnings.filterwarnings("ignore", category=FutureWarning, module="torch")
|
14 |
|
15 |
# Suppress output for copying files and verbose model initialization messages
|
|
|
66 |
outputs=outputs,
|
67 |
title="Sugarcane Disease Detection",
|
68 |
examples=EXAMPLES,
|
|
|
69 |
live=True,
|
70 |
theme="huggingface"
|
71 |
)
|
|
|
73 |
demo_app.launch(debug=True, enable_queue=True)
|
74 |
|
75 |
|
76 |
+
|