mstkyvz commited on
Commit
18821eb
·
1 Parent(s): 1bb4b3f

Delete app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -26
app.py DELETED
@@ -1,26 +0,0 @@
1
- import streamlit as st
2
- import tensorflow as tf
3
- import pickle
4
-
5
- # Model ve Vectorizer'ı yükleme
6
- model = tf.keras.models.load_model("xss_detection_model-3.h5")
7
-
8
- with open("vectorizer.pkl", "rb") as file:
9
- vectorizer = pickle.load(file)
10
-
11
- # Streamlit başlığı
12
- st.title("XSS Detector")
13
-
14
- # Kullanıcı girdisi
15
- user_input = st.text_area("XSS payload'ınızı buraya girin", height=100)
16
-
17
- # Tespit butonu
18
- if st.button("Tespit Et"):
19
- transformed_input = vectorizer.transform([user_input]).toarray()
20
- prediction = model.predict(transformed_input)
21
-
22
- # Sonucu ekranda gösterme
23
- if prediction[0] > 0.5:
24
- st.write("Bu bir XSS payload!")
25
- else:
26
- st.write("Bu bir XSS payload DEĞİL!")