thomascuddihy commited on
Commit
97de52d
·
1 Parent(s): 7a18c0b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -10
app.py CHANGED
@@ -23,16 +23,7 @@ def clf_result(text_input: str) -> str:
23
  res = "Please enter a sentence with the word `best`"
24
  return res
25
  model_res = clf(text_input)[0]
26
- logger.warning(f"{model_res = }")
27
- logger.warning(f"{model_res['label'] = }")
28
- print(f"{model_res['label'] = }")
29
- # label_map = {"LABEL_0": "NOT RISKY", "LABEL_1": "RISKY"}
30
- label_map = {
31
- "0": "Not Risky",
32
- "1": "Possibly Risky",
33
- "2": "Risky"
34
- }
35
- label_res = label_map.get(model_res["label"])
36
  score = model_res["score"]
37
  res = f"Result: {label_res}\n\nScore: {score}"
38
  return res
 
23
  res = "Please enter a sentence with the word `best`"
24
  return res
25
  model_res = clf(text_input)[0]
26
+ label_res = model_res["label"]
 
 
 
 
 
 
 
 
 
27
  score = model_res["score"]
28
  res = f"Result: {label_res}\n\nScore: {score}"
29
  return res