Commit 23ecac89 authored by G.M. Amashi S. Bastiansz's avatar G.M. Amashi S. Bastiansz 🎯

#Removed unecessary comments

parent ab1c6ae3
......@@ -2,14 +2,20 @@
#1, Created
# for testing purposes... Do not edit without permission
from flask import Flask, render_template, request, jsonify, redirect, url_for
from flask import Flask, render_template, request, jsonify, redirect, url_for, send_from_directory
import json
import re
import os
app = Flask(__name__)
@app.route('/favicon.ico')
def favicon():
return send_from_directory(os.path.join(app.root_path, 'static'), 'favicon.ico', mimetype='image/vnd.microsoft.icon')
@app.route("/")
def home():
return render_template("index.html")
......@@ -17,11 +23,6 @@ def home():
@app.route('/response/', methods=['POST'])
def response():
# msg = str(request.form.get('message'))
# newText = msg
# data = {'newText': newText}
# data = jsonify(data)
# return data
message = request.get_json()
print(message['message'])
split_input(message['message'])
......@@ -37,8 +38,6 @@ def split_input(userText):
resLength = len(res)
split_words = str(res)
print("This is a sentence with multiple words")
# Then the system will break each word into letters
i = 0
while i < resLength:
......@@ -48,7 +47,6 @@ def split_input(userText):
else:
# if user entered ONLY one word, then the system should split it into letters
print('This is only one word')
print(list(userText_lower))
......
......@@ -19,7 +19,7 @@ h3 {
}
#chatbox {
background-color: black;
background-color: white;
margin-left: auto;
margin-right: auto;
width: 40%;
......@@ -48,6 +48,7 @@ h3 {
background-color: white;
color: green;
border-color: green;
border-radius: 2px;
}
#buttonInput :hover {
......@@ -78,10 +79,10 @@ h3 {
}
.botText span {
background-color: black;
background-color: white;
padding: 10px;
border-radius: 2px;
color: white;
color: black;
}
#tidbit {
......
......@@ -33,7 +33,8 @@
name="msg"
placeholder="Enter text here"
/>
<button id="buttonInput" type="submit">SEND</button>
<br /><br />
<button id="buttonInput" type="submit">TRANSLATE</button>
</div>
</form>
<p id="req"></p>
......@@ -68,9 +69,6 @@
document
.getElementById("userInput")
.scrollIntoView({ block: "start", behavior: "smooth" });
//$("#textInput").val("");
//$("#req").html("Your response is : " + data["newText"]);
},
});
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment