Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -60,14 +60,12 @@ except Exception as e:
|
|
60 |
|
61 |
# --- Load Knowledge Base and Labels ---
|
62 |
try:
|
63 |
-
|
64 |
-
with open(knowledge_base_path, 'r') as f:
|
65 |
knowledge_base = json.load(f)
|
66 |
-
print("--> Knowledge base loaded from
|
67 |
except Exception as e:
|
68 |
-
print(f"!!! ERROR loading knowledge_base.json
|
69 |
-
raise gr.Error("knowledge_base.json not found
|
70 |
-
|
71 |
|
72 |
idx_to_class_abbr = {0: 'MEL', 1: 'NV', 2: 'BCC', 3: 'AKIEC', 4: 'BKL', 5: 'DF', 6: 'VASC'}
|
73 |
|
|
|
60 |
|
61 |
# --- Load Knowledge Base and Labels ---
|
62 |
try:
|
63 |
+
with open("knowledge_base.json", 'r') as f:
|
|
|
64 |
knowledge_base = json.load(f)
|
65 |
+
print("--> Knowledge base loaded from local file.")
|
66 |
except Exception as e:
|
67 |
+
print(f"!!! ERROR loading knowledge_base.json: {e}")
|
68 |
+
raise gr.Error("knowledge_base.json not found. Make sure it has been uploaded.")
|
|
|
69 |
|
70 |
idx_to_class_abbr = {0: 'MEL', 1: 'NV', 2: 'BCC', 3: 'AKIEC', 4: 'BKL', 5: 'DF', 6: 'VASC'}
|
71 |
|