|
from aeo_ex_generator.aeo_example_generator import ExampleGenerator |
|
|
|
import openai |
|
import os |
|
import streamlit as st |
|
|
|
import streamlit as st |
|
|
|
st.subheader("This space will autognerate the plans and the personas") |
|
|
|
OpenAI_Key = st.text_input(" Please enter your OpenAI key here to continue") |
|
|
|
if OpenAI_Key: |
|
st.write("Please wait, it will take a while to generate. ") |
|
os.environ['OPENAI_API_KEY'] = OpenAI_Key |
|
openai.api_key =os.environ['OPENAI_API_KEY'] |
|
|
|
|
|
|
|
ex = ExampleGenerator() |
|
e = ex.auto_generate() |
|
|
|
st.write(ex.description) |
|
|
|
st.subheader('Prefix Namespaces') |
|
st.write(e['@context']) |
|
|
|
|
|
|
|
result = [i for i in e['@graph']] |
|
st.subheader('Full example:') |
|
try: |
|
st.json(result) |
|
except: |
|
st.text_area("", result, height=400) |
|
|
|
if result: |
|
st.subheader("Auto generate specific plan") |
|
keywords = st.text_area("Enter keywords to keep in the plan","breadcrumbtrail") |
|
nkeywords= st.text_area("You can pass keywords to exclude from the example generation", "honeypot") |
|
personas = ex.generate_personas() |
|
st.subheader("Person based on the existing description provided in the deception plan") |
|
st.write( ex.persona_descriptions) |
|
|