Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,9 +3,18 @@ from requests_html import HTMLSession
|
|
| 3 |
import pandas as pd
|
| 4 |
import langchain as lc
|
| 5 |
import openai
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
st.title("Cybersecurity Vulnerability Scanner & AI Analyzer")
|
| 8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
# Input URL for scraping
|
| 10 |
url = st.text_input("Enter the target URL:")
|
| 11 |
|
|
@@ -52,4 +61,4 @@ if st.button("Analyze with AI"):
|
|
| 52 |
except Exception as e:
|
| 53 |
st.error(f"AI analysis failed: {e}")
|
| 54 |
else:
|
| 55 |
-
st.warning("Please provide an AI prompt for analysis.")
|
|
|
|
| 3 |
import pandas as pd
|
| 4 |
import langchain as lc
|
| 5 |
import openai
|
| 6 |
+
import os
|
| 7 |
+
|
| 8 |
+
# Set your OpenAI API key (ensure it's set securely in production)
|
| 9 |
+
os.environ["OPENAI_API_KEY"] = "your-api-key-here"
|
| 10 |
|
| 11 |
st.title("Cybersecurity Vulnerability Scanner & AI Analyzer")
|
| 12 |
|
| 13 |
+
# Initialize variables
|
| 14 |
+
links = []
|
| 15 |
+
js_files = []
|
| 16 |
+
forms = []
|
| 17 |
+
|
| 18 |
# Input URL for scraping
|
| 19 |
url = st.text_input("Enter the target URL:")
|
| 20 |
|
|
|
|
| 61 |
except Exception as e:
|
| 62 |
st.error(f"AI analysis failed: {e}")
|
| 63 |
else:
|
| 64 |
+
st.warning("Please provide an AI prompt for analysis.")
|