Commit a054f187 authored by Chris's avatar Chris
Browse files

refactor sample messages back to top words

parent 04dc2ee7
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -28,11 +28,11 @@
        <div id="spam_messages_list">
            <p>Some random sample spam messages (unanimously voted by all 4 algorithms):
                    <ol>
                        <li id="top1">Message 1</li>
                        <li id="top2">Message 2</li>
                        <li id="top3">Message 3</li>
                        <li id="top4">Message 4</li>
                        <li id="top5">Message 5</li>
                        <li id="top1">Word 1</li>
                        <li id="top2">Word 2</li>
                        <li id="top3">Word 3</li>
                        <li id="top4">Word 4</li>
                        <li id="top5">Word 5</li>
                    </ol>
                </p>
        </div>
+2 −2
Original line number Diff line number Diff line
@@ -154,7 +154,7 @@ function getTopAlgorithms() {
}

// todo get actual values from ml.py
function getSampleMessages() {
function getTopFiveWords() {
    var url = "http://localhost:8080"
    var endpoint = "/getWords"

@@ -191,7 +191,7 @@ function getSampleMessages() {
// called on index.html load: gets the top 5 algorithms and the top 5 words from server.py
function initializeIndex() {
    getTopAlgorithms();
    getSampleMessages();
    getTopFiveWords();
}

// when the Clear button is pressed, clear the message textarea