vSiddi commited on
Commit
02f3912
·
1 Parent(s): 8e29341

enabled default mode

Browse files
Files changed (2) hide show
  1. modules/app_constants.py +1 -1
  2. modules/nav_about.py +5 -5
modules/app_constants.py CHANGED
@@ -52,5 +52,5 @@ MAX_FILE_SIZE = 10 #not implement
52
  LOCAL_PERSISTANT_DB = WORKSPACE_DIRECTORY + "db/"
53
  CONTENT_TYPE = ["Policies", "Playbooks", "Standards", "Reference Docs"]
54
  SYSTEM_CONTENT_DATA = "app-content.json"
55
- SYSTEM_DEPLOYMENT_MODE = 0 #private-0, openai-1, demo-2
56
  ZYSEC_DEMO = "http://zysec.is-a-geek.com:8000/v1" #not enabled yet
 
52
  LOCAL_PERSISTANT_DB = WORKSPACE_DIRECTORY + "db/"
53
  CONTENT_TYPE = ["Policies", "Playbooks", "Standards", "Reference Docs"]
54
  SYSTEM_CONTENT_DATA = "app-content.json"
55
+ SYSTEM_DEPLOYMENT_MODE = 2 #private-0, openai-1, demo-2
56
  ZYSEC_DEMO = "http://zysec.is-a-geek.com:8000/v1" #not enabled yet
modules/nav_about.py CHANGED
@@ -35,8 +35,8 @@ def app():
35
  This mode is ideal if you have the necessary resources and want to keep data processing in-house.
36
  You can also use a local instance deployed with a URL endpoint.
37
  """)
38
- local_model_uri = st.text_input("Private Model Base URL Endpoint (OpenAI Compatible). Example http://localhost:8000/v1", key="local_model_uri",value=app_constants.local_model_uri)
39
- st.info("Use update configuration for changes to be affected")
40
 
41
 
42
  elif server_mode == "ZySec Demo":
@@ -47,7 +47,7 @@ def app():
47
  subject to availability. It's a great choice for trying out ZySec without any setup.
48
  """)
49
  remote_model_uri = st.text_input("Remote Model Base URL Endpoint",value=app_constants.ZYSEC_DEMO, key="remote_model_uri",disabled=True)
50
- st.info("Use update configuration for changes to be affected")
51
 
52
  elif server_mode == "OpenAI":
53
  st.markdown("### OpenAI Settings")
@@ -56,12 +56,12 @@ def app():
56
  This mode allows you to integrate OpenAI's powerful AI capabilities while keeping
57
  the rest of the functionalities security-centric. An OpenAI API key is required.
58
  """)
59
- openai_api_key = st.text_input("OpenAI API Key", type="password", key="openai_api_key",value=app_constants.openai_api_key)
60
  st.markdown(
61
  "Need an OpenAI API key? [Get it here](https://platform.openai.com/api-keys).",
62
  unsafe_allow_html=True
63
  )
64
- st.info("Use update configuration for changes to be affected")
65
 
66
  # Update app_constants based on user input
67
  if st.button("Update Configuration"):
 
35
  This mode is ideal if you have the necessary resources and want to keep data processing in-house.
36
  You can also use a local instance deployed with a URL endpoint.
37
  """)
38
+ local_model_uri = st.text_input("Private Model Base URL Endpoint (OpenAI Compatible). Example http://localhost:8000/v1",disabled=True, key="local_model_uri",value=app_constants.local_model_uri)
39
+ st.error("Disabled changes here but you can play with your own deployment")
40
 
41
 
42
  elif server_mode == "ZySec Demo":
 
47
  subject to availability. It's a great choice for trying out ZySec without any setup.
48
  """)
49
  remote_model_uri = st.text_input("Remote Model Base URL Endpoint",value=app_constants.ZYSEC_DEMO, key="remote_model_uri",disabled=True)
50
+ st.error("Disabled changes here but you can play with your own deployment")
51
 
52
  elif server_mode == "OpenAI":
53
  st.markdown("### OpenAI Settings")
 
56
  This mode allows you to integrate OpenAI's powerful AI capabilities while keeping
57
  the rest of the functionalities security-centric. An OpenAI API key is required.
58
  """)
59
+ openai_api_key = st.text_input("OpenAI API Key", type="password", key="openai_api_key",value=app_constants.openai_api_key,disabled=True)
60
  st.markdown(
61
  "Need an OpenAI API key? [Get it here](https://platform.openai.com/api-keys).",
62
  unsafe_allow_html=True
63
  )
64
+ st.error("Disabled here but you can play with your own deployment")
65
 
66
  # Update app_constants based on user input
67
  if st.button("Update Configuration"):