Spaces:
Sleeping
Sleeping
Update streamlit_app.py
Browse files- streamlit_app.py +4 -6
streamlit_app.py
CHANGED
|
@@ -6,7 +6,7 @@ from transformers import pipeline
|
|
| 6 |
st.title("News App - Created by Group 09")
|
| 7 |
|
| 8 |
#creating the sub heading
|
| 9 |
-
st.write("Welcome! In this app users may find the below features")
|
| 10 |
|
| 11 |
#creating the content included in the page
|
| 12 |
st.write("The users can work with uploaded using the Classification page which includes")
|
|
@@ -22,7 +22,7 @@ st.write("""
|
|
| 22 |
- Key-Word recognition
|
| 23 |
""")
|
| 24 |
|
| 25 |
-
st.write("In order to test the classification of the model quickly,")
|
| 26 |
|
| 27 |
@st.cache_resource
|
| 28 |
def load_classifier():
|
|
@@ -44,9 +44,7 @@ if st.button("Classify Text"):
|
|
| 44 |
result = classifier(user_text)
|
| 45 |
|
| 46 |
st.success("Classification complete.")
|
| 47 |
-
st.write("### Prediction")
|
| 48 |
-
st.write(result[0]["label"])
|
| 49 |
|
| 50 |
if "score" in result[0]:
|
| 51 |
-
st.write("### Confidence")
|
| 52 |
-
st.write(round(result[0]["score"], 4))
|
|
|
|
| 6 |
st.title("News App - Created by Group 09")
|
| 7 |
|
| 8 |
#creating the sub heading
|
| 9 |
+
st.write("## Welcome! In this app users may find the below features")
|
| 10 |
|
| 11 |
#creating the content included in the page
|
| 12 |
st.write("The users can work with uploaded using the Classification page which includes")
|
|
|
|
| 22 |
- Key-Word recognition
|
| 23 |
""")
|
| 24 |
|
| 25 |
+
st.write(" ## In order to test the classification of the model quickly,")
|
| 26 |
|
| 27 |
@st.cache_resource
|
| 28 |
def load_classifier():
|
|
|
|
| 44 |
result = classifier(user_text)
|
| 45 |
|
| 46 |
st.success("Classification complete.")
|
| 47 |
+
st.write("### Prediction", result[0]["label"])
|
|
|
|
| 48 |
|
| 49 |
if "score" in result[0]:
|
| 50 |
+
st.write("### Confidence",round(result[0]["score"], 4))
|
|
|