File size: 986 Bytes
50cb8a1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
from lureGeneration.LureGenerator import LureGenerator
import openai
import os
import streamlit as st
import streamlit as st
st.subheader("In this example you can Lure based on AEO ")
OpenAI_Key = st.text_input(" Please enter your OpenAI key here to continue")
# only continue if the key is given
if OpenAI_Key:
os.environ['OPENAI_API_KEY'] = OpenAI_Key
openai.api_key =os.environ['OPENAI_API_KEY']
# ['honeytoken','honeypot','honeyfile']
honey_type = st.text_area(" Please enter one of the type: ['honeytoken','honeypot','honeyfile'] ","honeyfile", height=50)
# Description
description = st.text_area("Please enter the description. ", "CEO of a critical mining company", height=50)
ex = LureGenerator() #declare the instance
e = ex.generate(honey_type,description)
response = ex.lure[0].content
json_ld = ex.lure[0].json
st.subheader('Content')
st.write(response)
st.subheader('JSON-LD Description')
st.write(json_ld)
|