leavoigt commited on
Commit
963f8de
·
1 Parent(s): 52f3f04

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -41,8 +41,6 @@ def predict(text):
41
  preds = model([text])[0].item()
42
  return group_dict[preds]
43
 
44
- text = st.text_area('enter your text here')
45
-
46
  # App
47
  st.title("Identify references to vulnerable groups.")
48
  st.write("This app allows you to identify whether a text contains any references to vulnerable groups. This can, for example, be used to analyse policy documents.")
@@ -52,7 +50,9 @@ col1, col2 = st.columns(2)
52
  with col1:
53
  input_text = st.text_area('enter your text here')
54
 
55
- #with col2:
56
- # st.text(f"{ group_dict['label'] }: { round(p['score'] * 100, 1)}%")
 
 
57
 
58
  st.write("Example: To promote gender diversity, several new policies are being implemented")
 
41
  preds = model([text])[0].item()
42
  return group_dict[preds]
43
 
 
 
44
  # App
45
  st.title("Identify references to vulnerable groups.")
46
  st.write("This app allows you to identify whether a text contains any references to vulnerable groups. This can, for example, be used to analyse policy documents.")
 
50
  with col1:
51
  input_text = st.text_area('enter your text here')
52
 
53
+ preds = model(["input_text"])
54
+
55
+ with col2:
56
+ st.text(preds)
57
 
58
  st.write("Example: To promote gender diversity, several new policies are being implemented")