-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add security promps into Generative AI
- Loading branch information
Showing
34 changed files
with
340 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,22 @@ | ||
# Copyright (c) 2024 Microsoft Corporation. All rights reserved. | ||
from util.session_variables import SessionVariables | ||
import workflows.attribute_patterns.workflow | ||
from components.app_loader import load_multipage_app | ||
import streamlit as st | ||
from util.enums import Mode | ||
|
||
def main(): | ||
st.set_page_config(layout="wide", initial_sidebar_state="collapsed", page_icon="app/myapp.ico", page_title='Intelligence Toolkit | Attribute Patterns') | ||
load_multipage_app() | ||
workflows.attribute_patterns.workflow.create() | ||
sv_home = SessionVariables('home') | ||
|
||
try: | ||
workflows.attribute_patterns.workflow.create() | ||
except Exception as e: | ||
if sv_home.mode.value == Mode.DEV.value: | ||
st.exception(e) | ||
else: | ||
st.error(f"An error occurred: {e}") | ||
|
||
if __name__ == '__main__': | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,22 @@ | ||
# Copyright (c) 2024 Microsoft Corporation. All rights reserved. | ||
from util.session_variables import SessionVariables | ||
import workflows.data_synthesis.workflow | ||
from components.app_loader import load_multipage_app | ||
import streamlit as st | ||
from util.enums import Mode | ||
|
||
|
||
def main(): | ||
st.set_page_config(layout="wide", initial_sidebar_state="collapsed", page_icon="app/myapp.ico", page_title='Intelligence Toolkit | Data Synthesis') | ||
load_multipage_app() | ||
workflows.data_synthesis.workflow.create() | ||
sv_home = SessionVariables('home') | ||
try: | ||
workflows.data_synthesis.workflow.create() | ||
except Exception as e: | ||
if sv_home.mode.value == Mode.DEV.value: | ||
st.exception(e) | ||
else: | ||
st.error(f"An error occurred: {e}") | ||
|
||
if __name__ == '__main__': | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,21 @@ | ||
# Copyright (c) 2024 Microsoft Corporation. All rights reserved. | ||
from util.session_variables import SessionVariables | ||
import workflows.group_narratives.workflow | ||
import streamlit as st | ||
from components.app_loader import load_multipage_app | ||
from util.enums import Mode | ||
|
||
def main(): | ||
st.set_page_config(layout="wide", initial_sidebar_state="collapsed", page_icon="app/myapp.ico", page_title='Intelligence Toolkit | Group Narratives') | ||
sv_home = SessionVariables('home') | ||
load_multipage_app() | ||
workflows.group_narratives.workflow.create() | ||
try: | ||
workflows.group_narratives.workflow.create() | ||
except Exception as e: | ||
if sv_home.mode.value == Mode.DEV.value: | ||
st.exception(e) | ||
else: | ||
st.error(f"An error occurred: {e}") | ||
|
||
if __name__ == '__main__': | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,21 @@ | ||
# Copyright (c) 2024 Microsoft Corporation. All rights reserved. | ||
from util.session_variables import SessionVariables | ||
import workflows.question_answering.workflow | ||
from components.app_loader import load_multipage_app | ||
import streamlit as st | ||
|
||
from util.enums import Mode | ||
|
||
def main(): | ||
st.set_page_config(layout="wide", initial_sidebar_state="collapsed", page_icon="app/myapp.ico", page_title='Intelligence Toolkit | Question Answering') | ||
load_multipage_app() | ||
workflows.question_answering.workflow.create() | ||
|
||
sv_home = SessionVariables('home') | ||
try: | ||
workflows.question_answering.workflow.create() | ||
except Exception as e: | ||
if sv_home.mode.value == Mode.DEV.value: | ||
st.exception(e) | ||
else: | ||
st.error(f"An error occurred: {e}") | ||
|
||
if __name__ == '__main__': | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,22 @@ | ||
# Copyright (c) 2024 Microsoft Corporation. All rights reserved. | ||
from util.session_variables import SessionVariables | ||
import workflows.record_matching.workflow | ||
from components.app_loader import load_multipage_app | ||
import streamlit as st | ||
from util.enums import Mode | ||
|
||
def main(): | ||
st.set_page_config(layout="wide", initial_sidebar_state="collapsed", page_icon="app/myapp.ico", page_title='Intelligence Toolkit | Record Matching') | ||
load_multipage_app() | ||
workflows.record_matching.workflow.create() | ||
sv_home = SessionVariables('home') | ||
|
||
try: | ||
workflows.record_matching.workflow.create() | ||
except Exception as e: | ||
if sv_home.mode.value == Mode.DEV.value: | ||
st.exception(e) | ||
else: | ||
st.error(f"An error occurred: {e}") | ||
|
||
if __name__ == '__main__': | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,22 @@ | ||
# Copyright (c) 2024 Microsoft Corporation. All rights reserved. | ||
from util.session_variables import SessionVariables | ||
import workflows.risk_networks.workflow | ||
from components.app_loader import load_multipage_app | ||
import streamlit as st | ||
from util.enums import Mode | ||
|
||
def main(): | ||
st.set_page_config(layout="wide", initial_sidebar_state="collapsed", page_icon="app/myapp.ico", page_title='Intelligence Toolkit | Risk Networks') | ||
load_multipage_app() | ||
workflows.risk_networks.workflow.create() | ||
sv_home = SessionVariables('home') | ||
|
||
try: | ||
workflows.risk_networks.workflow.create() | ||
except Exception as e: | ||
if sv_home.mode.value == Mode.DEV.value: | ||
st.exception(e) | ||
else: | ||
st.error(f"An error occurred: {e}") | ||
|
||
if __name__ == '__main__': | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Copyright (c) 2024 Microsoft Corporation. All rights reserved. | ||
|
||
from enum import Enum | ||
|
||
class Mode(Enum): | ||
DEV = 'dev' | ||
CLOUD = 'cloud' | ||
EXE = 'exe' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.