Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -2,38 +2,6 @@ import spacy
|
|
2 |
import json
|
3 |
from datetime import datetime
|
4 |
import streamlit as st
|
5 |
-
from st_theme_select import st_theme_select
|
6 |
-
|
7 |
-
# Create a custom theme
|
8 |
-
custom_theme = {
|
9 |
-
"primaryColor": "#009688", # Change this to your preferred color
|
10 |
-
"backgroundColor": "#f2f2f2", # Change this to your preferred background color
|
11 |
-
"secondaryBackgroundColor": "#ffffff",
|
12 |
-
"textColor": "#000000",
|
13 |
-
"font": "sans-serif",
|
14 |
-
}
|
15 |
-
|
16 |
-
# Apply the custom theme
|
17 |
-
st.set_page_config(
|
18 |
-
page_title="Annotation Tool",
|
19 |
-
page_icon=":bookmark:",
|
20 |
-
layout="wide",
|
21 |
-
initial_sidebar_state="expanded",
|
22 |
-
theme=custom_theme,
|
23 |
-
)
|
24 |
-
|
25 |
-
# Add Hugging Face's logo
|
26 |
-
st.image("huggingface_logo.png") # Replace with the actual image URL or path
|
27 |
-
|
28 |
-
# Customize the Streamlit title
|
29 |
-
st.title("Hugging Face Annotation Tool")
|
30 |
-
|
31 |
-
# Theme selection widget
|
32 |
-
selected_theme = st_theme_select("Select Theme", theme="default")
|
33 |
-
|
34 |
-
# Check the selected theme and apply it
|
35 |
-
if selected_theme != "default":
|
36 |
-
st.set_theme(selected_theme)
|
37 |
|
38 |
nlp = spacy.load('la_core_web_lg')
|
39 |
|
@@ -107,4 +75,4 @@ if st.button("Save Modifications as JSON"):
|
|
107 |
st.success(f"Annotations saved as {filename}")
|
108 |
|
109 |
# Add Materialize JavaScript
|
110 |
-
st.markdown('<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>', unsafe_allow_html=True)
|
|
|
2 |
import json
|
3 |
from datetime import datetime
|
4 |
import streamlit as st
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
nlp = spacy.load('la_core_web_lg')
|
7 |
|
|
|
75 |
st.success(f"Annotations saved as {filename}")
|
76 |
|
77 |
# Add Materialize JavaScript
|
78 |
+
st.markdown('<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>', unsafe_allow_html=True)
|