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
bc887c2a
Commit
bc887c2a
authored
Jan 09, 2021
by
G.M. Amashi S. Bastiansz
🎯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed unwanted files & comments
parent
45582aad
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
0 additions
and
350 deletions
+0
-350
api.py
api.py
+0
-6
index.html
index.html
+0
-23
reveng/static/styles/style.css
reveng/static/styles/style.css
+0
-93
reveng/templates/__init__.py
reveng/templates/__init__.py
+0
-0
reveng/templates/upload.html
reveng/templates/upload.html
+0
-47
templates/chatbot.html
templates/chatbot.html
+0
-100
templates/index.html
templates/index.html
+0
-81
No files found.
api.py
View file @
bc887c2a
...
...
@@ -60,17 +60,11 @@ def textToSignEngine():
@
app
.
route
(
'/tts/get/<msg>'
,
methods
=
[
'GET'
,
'POST'
])
def
response
(
msg
):
clearoutputfolder
()
# message = request.get_json()
# responseGIF = processInput(message['message'])
print
(
msg
)
responseGIF
=
processInput
(
msg
)
# response = {
# "gifPath": responseGIF
# }
clearoutputfolder
()
return
responseGIF
# return send_file(responseGIF, mimetype='image/gif')
# clear the OUTPUT folder after displaying the GIF image
...
...
index.html
deleted
100644 → 0
View file @
45582aad
<html>
<body>
HELLO
<img
id=
"image"
>
<script
src=
"https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.3.0/socket.io.js"
>
</script>
<script>
const
socket
=
io
.
connect
(
'
http://localhost:5000
'
);
socket
.
on
(
'
image
'
,(
data
)
=>
{
console
.
log
(
'
data
'
,
data
);
});
function
callGoogle
(){
window
.
open
(
'
/google
'
)
}
</script>
<button
onclick=
"callGoogle()"
>
google
</button>
</body>
</html>
\ No newline at end of file
reveng/static/styles/style.css
deleted
100644 → 0
View file @
45582aad
html
{
background-color
:
white
;
color
:
black
;
}
h1
{
color
:
black
;
margin-bottom
:
0
;
margin-top
:
0
;
text-align
:
center
;
font-size
:
40px
;
}
h3
{
color
:
black
;
font-size
:
20px
;
margin-top
:
3px
;
text-align
:
center
;
}
#chatbox
{
background-color
:
white
;
margin-left
:
auto
;
margin-right
:
auto
;
width
:
40%
;
margin-top
:
60px
;
}
#userInput
{
margin-left
:
auto
;
margin-right
:
auto
;
width
:
40%
;
margin-top
:
60px
;
}
#textInput
{
width
:
87%
;
border
:
none
;
border-bottom
:
1px
solid
#009688
;
font-family
:
monospace
;
font-size
:
17px
;
}
#buttonInput
{
padding
:
3px
;
font-family
:
monospace
;
font-size
:
17px
;
background-color
:
white
;
color
:
green
;
border-color
:
green
;
border-radius
:
2px
;
}
#buttonInput
:hover
{
background-color
:
green
;
color
:
white
;
}
.userText
{
color
:
black
;
font-family
:
monospace
;
font-size
:
17px
;
text-align
:
right
;
line-height
:
30px
;
}
.userText
span
{
background-color
:
#009688
;
padding
:
10px
;
border-radius
:
2px
;
}
.botText
{
color
:
black
;
font-family
:
monospace
;
font-size
:
17px
;
text-align
:
left
;
line-height
:
30px
;
}
.botText
span
{
background-color
:
white
;
padding
:
10px
;
border-radius
:
2px
;
color
:
black
;
}
#tidbit
{
position
:
absolute
;
bottom
:
0
;
right
:
0
;
width
:
300px
;
}
reveng/templates/__init__.py
deleted
100644 → 0
View file @
45582aad
reveng/templates/upload.html
deleted
100644 → 0
View file @
45582aad
<!--
* The file is to create a form for uploading and display files
* For TESTING purposes
*
* @author Amashi Bastiansz | IT17143950
* @version 1.0
* @since 2020-10-01
-->
<!doctype html>
<html>
<head>
<title>
Python Flask File Upload Example
</title>
</head>
<body>
<h2>
Select a file to upload
</h2>
<p>
{% with messages = get_flashed_messages() %}
{% if messages %}
<ul
class=
flashes
>
{% for message in messages %}
<li>
{{ message }}
</li>
{% endfor %}
</ul>
{% endif %}
{% endwith %}
</p>
{% if filename %}
<div>
<img
src=
"{{ url_for('display_image', filename=filename) }}"
>
</div>
{% endif %}
<form
method=
"post"
action=
"/"
enctype=
"multipart/form-data"
>
<dl>
<p>
<input
type=
"file"
name=
"file"
autocomplete=
"off"
required
>
</p>
</dl>
<p>
<input
type=
"submit"
value=
"Submit"
>
</p>
</form>
</body>
</html>
templates/chatbot.html
deleted
100644 → 0
View file @
45582aad
<!DOCTYPE html>
<html>
<head>
<link
rel=
"stylesheet"
href=
"static/styles/chatbot-test.css"
/>
<script>
window
.
console
=
window
.
console
||
function
(
t
)
{};
</script>
<script
src=
"https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"
></script>
<script>
if
(
document
.
location
.
search
.
match
(
/type=embed/gi
))
{
window
.
parent
.
postMessage
(
"
resize
"
,
"
*
"
);
}
</script>
<script
src=
"chrome-extension://mooikfkahbdckldjjndioackbalphokd/assets/prompt.js"
></script>
</head>
<body
translate=
"no"
data-new-gr-c-s-check-loaded=
"14.990.0"
data-gr-ext-installed=
""
>
<div
class=
"chat"
>
<div
class=
"messages"
>
<div
class=
"message"
>
<div
class=
"bot"
>
Send something like "good morning " or "sorry"
</div>
</div>
</div>
<div
class=
"input"
>
<form
action=
"#"
id=
"chat"
method=
"post"
>
<input
class=
"text"
contenteditable=
""
placeholder=
"Type your message here..."
>
</form>
</div>
</div>
<script
src=
"https://cpwebassets.codepen.io/assets/common stopExecutionOnTimeout-157cd5b220a5c80d4ff8e0e70ac069bffd87a61252088146915e8726e5d9f147.js"
></script>
<script
src=
"https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"
></script>
<script
id=
"rendered-js"
>
(
function
()
{
var
app
;
$
(
document
).
ready
(
function
()
{
return
app
.
init
();
});
app
=
{
//api_key: "dc6zaTOxFJmzC", // Public API key from giphy.com
init
:
function
()
{
return
this
.
bind_events
();
},
bind_events
:
function
()
{
return
$
(
document
).
on
(
"
submit
"
,
"
#chat
"
,
function
(
e
)
{
app
.
send_message
();
return
e
.
preventDefault
();
});
},
send_message
:
function
()
{
var
msg
;
msg
=
$
(
"
.text
"
).
val
().
trim
();
if
(
msg
)
{
$
(
"
.text
"
).
val
(
""
);
$
(
"
.messages
"
).
append
(
"
<div class='message'><div class='you'>
"
+
msg
+
"
</div></div>
"
);
return
this
.
check
(
msg
);
}
},
check
:
function
(
msg
)
{
var
keyword
;
if
(
msg
!=
null
)
{
return
this
.
get_gif
(
msg
);
}
else
{
return
this
.
bot_post
(
"
Wrong syntax ''gif me keyword''.
"
);
}
},
bot_post
:
function
(
msg
)
{
return
$
(
"
.messages
"
).
append
(
"
<div class='message'><div class='bot'>
"
+
msg
+
"
</div></div>
"
);
},
get_gif
:
function
(
keyword
)
{
console
.
log
(
keyword
)
return
$
.
get
(
`http://localhost:3000/tts/get/
${
keyword
}
`
,
function
(
data
)
{
var
index
;
console
.
log
(
data
)
return
app
.
bot_post
(
"
<img src='
"
+
data
.
gifPublicUrl
+
"
' alt='' />
"
);
}
);
}
};
}).
call
(
this
);
</script>
</body>
</html>
\ No newline at end of file
templates/index.html
deleted
100644 → 0
View file @
45582aad
<!--
* The file is to create a form for Text to SSL Translator
* For TESTING purposes
*
* @author Amashi Bastiansz | IT17143950
* @version 1.0
* @since 2020-10-01
-->
<!DOCTYPE html>
<html>
<head>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{{url_for('static', filename='styles/style.css')}}"
/>
<script
src=
"https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"
></script>
</head>
<body>
<h1
style=
"color: black"
>
Text to SSL Translator
</h1>
<div>
<div
id=
"chatbox"
>
<p
class=
"botText"
>
<span
>
Welcome to Text to Sign Convertor.
<br
/>
Enter the sentence you need to translate into SSL
</span
>
</p>
</div>
<form
action=
""
method=
"POST"
id=
"form"
>
<div
id=
"userInput"
>
<input
id=
"textInput"
name=
"msg"
maxlength=
"50"
placeholder=
"Enter text here"
/>
<br
/><br
/>
<button
id=
"buttonInput"
type=
"submit"
>
TRANSLATE
</button>
</div>
</form>
</div>
<script
src=
"https://code.jquery.com/jquery-3.2.1.min.js"
></script>
<script>
$
(
"
#textInput
"
).
keypress
(
function
(
e
)
{
if
(
e
.
which
==
13
)
{
getResponseSign
();
}
});
$
(
"
#buttonInput
"
).
click
(
function
()
{
getResponseSign
();
});
$
(
"
#form
"
).
on
(
"
submit
"
,
function
(
e
)
{
var
message
=
$
(
"
#textInput
"
).
val
();
e
.
preventDefault
();
$
.
ajax
({
url
:
"
http://localhost:3000/tts/response/
"
,
data
:
JSON
.
stringify
({
message
:
message
}),
method
:
"
POST
"
,
contentType
:
"
application/json
"
,
success
:
function
(
message
)
{
var
text
=
$
(
"
#textInput
"
).
val
();
var
userHtml
=
'
<p class="userText"><span>
'
+
text
+
"
</span></p>
"
;
$
(
"
#textInput
"
).
val
(
""
);
$
(
"
#chatbox
"
).
append
(
userHtml
);
document
.
getElementById
(
"
userInput
"
)
.
scrollIntoView
({
block
:
"
start
"
,
behavior
:
"
smooth
"
});
},
});
});
</script>
</body>
</html>
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