Spaces:
Running
Running
Update frontend.py
Browse files- frontend.py +4 -0
frontend.py
CHANGED
@@ -50,7 +50,11 @@ with st.sidebar:
|
|
50 |
|
51 |
DEFAULT_DEMO_TOKEN = "my-secret-key" # π‘ replace with secure demo token
|
52 |
api_token = st.text_input("π API Token", value=DEFAULT_DEMO_TOKEN, type="password")
|
|
|
|
|
|
|
53 |
|
|
|
54 |
backend_url = st.text_input("π Backend URL", value="http://localhost:8000")
|
55 |
|
56 |
sentiment_model = st.selectbox("π Sentiment Model", [
|
|
|
50 |
|
51 |
DEFAULT_DEMO_TOKEN = "my-secret-key" # π‘ replace with secure demo token
|
52 |
api_token = st.text_input("π API Token", value=DEFAULT_DEMO_TOKEN, type="password")
|
53 |
+
# π‘ Insert this warning right after the token field
|
54 |
+
if not api_token or api_token.strip() == "my-secret-key":
|
55 |
+
st.warning("π§ͺ Running in demo mode β for full access, enter a valid API key.")
|
56 |
|
57 |
+
|
58 |
backend_url = st.text_input("π Backend URL", value="http://localhost:8000")
|
59 |
|
60 |
sentiment_model = st.selectbox("π Sentiment Model", [
|