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
a6ca7c3d
Commit
a6ca7c3d
authored
Jan 12, 2021
by
Manoj Kumar
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'amashi_dev' into 'master'
change error message See merge request
!72
parents
3604f065
a8fd4b8c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
5 deletions
+21
-5
api.py
api.py
+5
-0
reveng/processInput.py
reveng/processInput.py
+11
-3
templates/textToSign.html
templates/textToSign.html
+5
-2
No files found.
api.py
View file @
a6ca7c3d
...
...
@@ -66,6 +66,11 @@ def response(msg):
responseGIF
=
processInput
(
msg
)
clearoutputfolder
()
emptyResponse
=
"NO_MATCHING_GIF"
if
responseGIF
==
"NULL"
:
responseGIF
=
emptyResponse
return
responseGIF
...
...
reveng/processInput.py
View file @
a6ca7c3d
...
...
@@ -121,10 +121,14 @@ def processInput(message):
imagesfromFirebase
=
io
.
BytesIO
(
response
.
content
)
img
=
pigm
.
open
(
imagesfromFirebase
)
sendingToGIF
.
append
(
img
)
return
generateGIF
(
sendingToGIF
)
if
not
sendingToGIF
:
return
"NULL"
else
:
return
generateGIF
(
sendingToGIF
)
else
:
if
checkInCommonWord
(
message
):
return
processCommon
Sentence
(
message
)
return
processCommon
Word
(
message
)
else
:
imageArray
=
[]
sendingToGIF
=
[]
...
...
@@ -154,4 +158,8 @@ def processInput(message):
imagesfromFirebase
=
io
.
BytesIO
(
response
.
content
)
img
=
pigm
.
open
(
imagesfromFirebase
)
sendingToGIF
.
append
(
img
)
return
generateGIF
(
sendingToGIF
)
if
not
sendingToGIF
:
return
"NULL"
else
:
return
generateGIF
(
sendingToGIF
)
\ No newline at end of file
templates/textToSign.html
View file @
a6ca7c3d
...
...
@@ -209,9 +209,12 @@
get_gif
:
function
(
keyword
)
{
console
.
log
(
keyword
)
return
$
.
get
(
`http://localhost:3000/tts/get/
${
keyword
}
`
,
function
(
data
)
{
var
index
;
console
.
log
(
data
)
if
(
data
==
"
NO_MATCHING_GIF
"
){
return
app
.
bot_post
(
`I'm sorry, But I don't seem to understand the term
${
keyword
}
. Please try another word`
)
}
else
{
return
app
.
bot_post
(
"
<img src='
"
+
data
.
gifPublicUrl
+
"
' alt='' />
"
);
}
});
}
};
...
...
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