Update app.py
Browse files
app.py
CHANGED
@@ -38,9 +38,9 @@ group_dict = {
|
|
38 |
29: 'Other'}
|
39 |
|
40 |
# Define prediction function
|
41 |
-
def predict(text):
|
42 |
-
|
43 |
-
|
44 |
|
45 |
# App
|
46 |
st.title("Identify references to vulnerable groups.")
|
@@ -51,16 +51,11 @@ into national climate policies, governments can ensure equitable outcomes, promo
|
|
51 |
fostering a more sustainable and inclusive society as we navigate the challenges posed by climate change.This app allows you to identify whether a text contains any
|
52 |
references to vulnerable groups, for example when talking about policy documents.""")
|
53 |
|
54 |
-
#col1, col2 = st.columns(2)
|
55 |
|
56 |
# Create text input box
|
57 |
input_text = st.text_area(label='Please enter your text here', value="This policy has been implemented to support women.")
|
58 |
|
59 |
-
st.write('Prediction:',
|
60 |
-
|
61 |
-
# Create the output box
|
62 |
-
#output=""
|
63 |
-
#st.text_area(label="Prediction:", height=350)
|
64 |
|
65 |
# Make predictions
|
66 |
#preds = model(input_text)
|
|
|
38 |
29: 'Other'}
|
39 |
|
40 |
# Define prediction function
|
41 |
+
#def predict(text):
|
42 |
+
# preds = model(text)
|
43 |
+
# return group_dict[preds]
|
44 |
|
45 |
# App
|
46 |
st.title("Identify references to vulnerable groups.")
|
|
|
51 |
fostering a more sustainable and inclusive society as we navigate the challenges posed by climate change.This app allows you to identify whether a text contains any
|
52 |
references to vulnerable groups, for example when talking about policy documents.""")
|
53 |
|
|
|
54 |
|
55 |
# Create text input box
|
56 |
input_text = st.text_area(label='Please enter your text here', value="This policy has been implemented to support women.")
|
57 |
|
58 |
+
st.write('Prediction:', model(input_text))
|
|
|
|
|
|
|
|
|
59 |
|
60 |
# Make predictions
|
61 |
#preds = model(input_text)
|