Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -2,7 +2,7 @@ import streamlit as st
|
|
2 |
from setfit import SetFitModel
|
3 |
|
4 |
# Load the model
|
5 |
-
model = SetFitModel.from_pretrained("
|
6 |
|
7 |
# Define the classes
|
8 |
group_dict = {
|
@@ -49,7 +49,10 @@ st.write("This app allows you to identify whether a text contains any references
|
|
49 |
|
50 |
col1, col2 = st.columns(2)
|
51 |
|
52 |
-
col1
|
53 |
-
|
54 |
|
55 |
-
|
|
|
|
|
|
|
|
2 |
from setfit import SetFitModel
|
3 |
|
4 |
# Load the model
|
5 |
+
model = SetFitModel.from_pretrained("leavoigt/vulnerable-groups")
|
6 |
|
7 |
# Define the classes
|
8 |
group_dict = {
|
|
|
49 |
|
50 |
col1, col2 = st.columns(2)
|
51 |
|
52 |
+
with col1:
|
53 |
+
input_text = text_area('enter your text here')
|
54 |
|
55 |
+
with col2:
|
56 |
+
st.write('f"{ group_dict['label'] }: { round(p['score'] * 100, 1)}%"')
|
57 |
+
|
58 |
+
st.write("Example: To promote gender diversity, several new policies are being implemented")
|