Spaces:
Runtime error
Runtime error
update space
Browse files
app.py
CHANGED
|
@@ -213,14 +213,16 @@ PROMPT_MAP = {
|
|
| 213 |
3: LlamaGuard2_PROMPT
|
| 214 |
}
|
| 215 |
|
| 216 |
-
|
| 217 |
-
MODEL_ID = "/mnt/hwfile/trustai/huxuhao/MD-Judge-v0.1"
|
| 218 |
|
| 219 |
def call_llama_guard_api(question: str, answer: str, evaluation_prompt_select: str):
|
| 220 |
if torch.cuda.is_available():
|
| 221 |
device = 'cuda'
|
| 222 |
else:
|
| 223 |
device = 'cpu'
|
|
|
|
|
|
|
| 224 |
if 'Domain' in evaluation_prompt_select:
|
| 225 |
evaluation_propmt = MD_DOMAIN_PROMPT
|
| 226 |
elif 'Task' in evaluation_prompt_select:
|
|
|
|
| 213 |
3: LlamaGuard2_PROMPT
|
| 214 |
}
|
| 215 |
|
| 216 |
+
MODEL_ID = "OpenSafetyLab/MD-Judge-v0.1"
|
| 217 |
+
# MODEL_ID = "/mnt/hwfile/trustai/huxuhao/MD-Judge-v0.1"
|
| 218 |
|
| 219 |
def call_llama_guard_api(question: str, answer: str, evaluation_prompt_select: str):
|
| 220 |
if torch.cuda.is_available():
|
| 221 |
device = 'cuda'
|
| 222 |
else:
|
| 223 |
device = 'cpu'
|
| 224 |
+
|
| 225 |
+
|
| 226 |
if 'Domain' in evaluation_prompt_select:
|
| 227 |
evaluation_propmt = MD_DOMAIN_PROMPT
|
| 228 |
elif 'Task' in evaluation_prompt_select:
|