Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
2020-077
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
2020-077
2020-077
Commits
23ecac89
Commit
23ecac89
authored
Jul 13, 2020
by
G.M. Amashi S. Bastiansz
🎯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#Removed unecessary comments
parent
ab1c6ae3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
16 deletions
+13
-16
reveng/app.py
reveng/app.py
+7
-9
reveng/static/styles/style.css
reveng/static/styles/style.css
+4
-3
reveng/templates/index.html
reveng/templates/index.html
+2
-4
No files found.
reveng/app.py
View file @
23ecac89
...
...
@@ -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
))
...
...
reveng/static/styles/style.css
View file @
23ecac89
...
...
@@ -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
{
...
...
reveng/templates/index.html
View file @
23ecac89
...
...
@@ -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"]);
},
});
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment