Update app.py
Browse files
app.py
CHANGED
|
@@ -56,8 +56,21 @@ def classify_text(text, classes):
|
|
| 56 |
predicted_class = decoded_output.split("Category:")[-1].strip()
|
| 57 |
return predicted_class
|
| 58 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
# Streamlit UI
|
| 60 |
-
st.title("π Text Classification with LLaMA 2 Chat (
|
| 61 |
st.write("Powered by LLaMA 2 Chat & Hugging Face")
|
| 62 |
|
| 63 |
# User Input
|
|
@@ -78,4 +91,4 @@ if st.button("Classify"):
|
|
| 78 |
st.warning("Please enter some text to classify.")
|
| 79 |
|
| 80 |
st.markdown("---")
|
| 81 |
-
st.write("π This app classifies text using the LLaMA 2 Chat model with FP16
|
|
|
|
| 56 |
predicted_class = decoded_output.split("Category:")[-1].strip()
|
| 57 |
return predicted_class
|
| 58 |
|
| 59 |
+
# Custom CSS to make all text red
|
| 60 |
+
st.markdown(
|
| 61 |
+
"""
|
| 62 |
+
<style>
|
| 63 |
+
/* Target all text elements */
|
| 64 |
+
body, h1, h2, h3, h4, h5, h6, p, div, span, input, textarea, button, label {
|
| 65 |
+
color: #E25822 !important;
|
| 66 |
+
}
|
| 67 |
+
</style>
|
| 68 |
+
""",
|
| 69 |
+
unsafe_allow_html=True
|
| 70 |
+
)
|
| 71 |
+
|
| 72 |
# Streamlit UI
|
| 73 |
+
st.title("π Text Classification with LLaMA 2 Chat (FP16)")
|
| 74 |
st.write("Powered by LLaMA 2 Chat & Hugging Face")
|
| 75 |
|
| 76 |
# User Input
|
|
|
|
| 91 |
st.warning("Please enter some text to classify.")
|
| 92 |
|
| 93 |
st.markdown("---")
|
| 94 |
+
st.write("π This app classifies text using the LLaMA 2 Chat model with FP16.")
|