Spaces:
Runtime error
Runtime error
Update utils.py
Browse files
utils.py
CHANGED
|
@@ -1,4 +1,3 @@
|
|
| 1 |
-
import torch
|
| 2 |
import torch.nn as nn
|
| 3 |
|
| 4 |
# ================================
|
|
@@ -43,15 +42,10 @@ class GliomaStageModel(nn.Module):
|
|
| 43 |
def forward(self, x):
|
| 44 |
return self.model(x)
|
| 45 |
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
# ================================
|
| 49 |
-
|
| 50 |
-
def get_precautions_from_gemini(tumor_type):
|
| 51 |
-
precaution_db = {
|
| 52 |
"meningioma": "Avoid radiation exposure and get regular check-ups.",
|
| 53 |
-
"pituitary":
|
| 54 |
-
"notumor":
|
| 55 |
-
"glioma": "Maintain a healthy lifestyle and follow up with neuro-oncologist."
|
| 56 |
}
|
| 57 |
-
return
|
|
|
|
|
|
|
| 1 |
import torch.nn as nn
|
| 2 |
|
| 3 |
# ================================
|
|
|
|
| 42 |
def forward(self, x):
|
| 43 |
return self.model(x)
|
| 44 |
|
| 45 |
+
def get_precautions_from_gemini(tumor_type: str) -> str:
|
| 46 |
+
db = {
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
"meningioma": "Avoid radiation exposure and get regular check-ups.",
|
| 48 |
+
"pituitary": "Monitor hormonal levels and follow medication strictly.",
|
| 49 |
+
"notumor": "Stay healthy and get annual MRI scans if symptoms appear."
|
|
|
|
| 50 |
}
|
| 51 |
+
return db.get(tumor_type.lower(), "No specific precautions found.")
|