Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README Group 11

To run the GUI:

1) Run the Flask API server

a) Install the packages

pip install flask

pip install torch

b) Run the API server

Open a new terminal window at the base folder team11 and execute:

cd python
flask --app Api_server run

2) Run the Java GUI

Open a new terminal window at the base folder team11 and execute:

./gradlew run

If ./gradlew is not working, use this fix: https://stackoverflow.com/questions/41700798/error-message-gradlew-command-not-found

To run the RNN model:

Please go to the Run_Small_RNN.py file in the RNN folder. From here the main method can be run. In the terminal you will see the request for a message. The message can be from any length as long as the text is encrypted with the keyword newkey. The encrypted text can be any text, since the model learned the english language. Meaning words/text not in the dataset do get decrypted correctly.

To run the Enigma model:

Please go to the Enigma_RNN.py file in the RNN folder. Then go down to the main method and make sure the line to run inference is uncommented and the line for training is commented. Within the inference line specify the correct model weights you want to run (e.g. pad_everything.pt). Then make sure to set the top variable called MAX_LENGTH_GLOBAL is set to the right value. For the pad_everything.pt file this value should be 115. Then run the file. In the terminal you will see the request for a message. Make sure the message is less than 115 characters long and the keyword in encrypted form, namely hitchhikersguidetothegalaxy is in the beginning of this message. You will see the model outputs the encrypted keyword as intended.

To extend the functionality of our model to handle longer texts and keywords positioned arbitrarily within the sentence, we need to address several challenges. Currently, the model's performance degrades when the keyword is placed at varying positions within the text, largely due to the overwhelming influence of padding tokens used during training. This results in the model learning to output padding values rather than identifying the keyword.

Future work can involve an attention mechanism to help the model attend to essential parts of the input sequence, so it can locate the keyword, no matter what its position in the sequence is. Also, redesigning a binary classification approach for output encoding—marking each character position as part of the keyword or not—could relieve the issue of padding dominance. Making the loss function such that misclassifying keyword characters is given more penalty compared to padding characters would further refine the focus of the model during training.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages