Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -15,9 +15,9 @@ import models
|
|
| 15 |
print(f"Is CUDA available: {torch.cuda.is_available()}")
|
| 16 |
# print(f"CUDA device: {torch.cuda.get_device_name(torch.cuda.current_device())}")
|
| 17 |
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
|
| 22 |
num_classes = len(list(index_to_species.keys()))
|
| 23 |
|
|
|
|
| 15 |
print(f"Is CUDA available: {torch.cuda.is_available()}")
|
| 16 |
# print(f"CUDA device: {torch.cuda.get_device_name(torch.cuda.current_device())}")
|
| 17 |
|
| 18 |
+
with open("index_to_species.json", "r") as file:
|
| 19 |
+
index_to_species_data = file.read()
|
| 20 |
+
index_to_species = json.loads(index_to_species_data)
|
| 21 |
|
| 22 |
num_classes = len(list(index_to_species.keys()))
|
| 23 |
|