Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -56,9 +56,9 @@ def malware_detection_DL (results, malicious_traffic, benign_traffic):
|
|
| 56 |
model.compile(optimizer ='adam',
|
| 57 |
loss = 'binary_crossentropy',
|
| 58 |
metrics = ['accuracy'])
|
| 59 |
-
|
| 60 |
-
#does not output epochs and gives evalutaion of validation data and history of losses and accuracy
|
| 61 |
-
history = model.fit(x_train, y_train, batch_size=32, epochs =
|
| 62 |
_, accuracy = model.evaluate(x_train, y_train)
|
| 63 |
#return history.history
|
| 64 |
if results=="Accuracy":
|
|
@@ -91,4 +91,4 @@ iface = gr.Interface(
|
|
| 91 |
|
| 92 |
)
|
| 93 |
|
| 94 |
-
iface.launch()
|
|
|
|
| 56 |
model.compile(optimizer ='adam',
|
| 57 |
loss = 'binary_crossentropy',
|
| 58 |
metrics = ['accuracy'])
|
| 59 |
+
|
| 60 |
+
#does not output epochs and gives evalutaion of validation data and history of losses and accuracy, epochs lowered to 10 from 150 for speed in displaying plot
|
| 61 |
+
history = model.fit(x_train, y_train, batch_size=32, epochs = 30,verbose=0, validation_data=(x_test, y_test))
|
| 62 |
_, accuracy = model.evaluate(x_train, y_train)
|
| 63 |
#return history.history
|
| 64 |
if results=="Accuracy":
|
|
|
|
| 91 |
|
| 92 |
)
|
| 93 |
|
| 94 |
+
iface.launch(enable_queue =True)
|