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
415fabce
Commit
415fabce
authored
Jan 08, 2021
by
Manoj Kumar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
a
parent
efff5624
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
101 additions
and
1 deletion
+101
-1
reveng/processInput.py
reveng/processInput.py
+1
-1
static/output/NZ7H1KLNDXLZLGJ.gif
static/output/NZ7H1KLNDXLZLGJ.gif
+0
-0
static/output/OAMWULBZBBPENPB.gif
static/output/OAMWULBZBBPENPB.gif
+0
-0
templates/chatbot.html
templates/chatbot.html
+100
-0
No files found.
reveng/processInput.py
View file @
415fabce
...
...
@@ -125,4 +125,4 @@ def processInput(message):
else
:
print
(
"this is a word"
)
if
checkInCommonWord
(
message
):
return
processCommonWord
(
message
)
\ No newline at end of file
return
processCommonWord
(
message
)
static/output/NZ7H1KLNDXLZLGJ.gif
0 → 100644
View file @
415fabce
1.02 MB
static/output/OAMWULBZBBPENPB.gif
0 → 100644
View file @
415fabce
1.02 MB
templates/chatbot.html
0 → 100644
View file @
415fabce
<!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"
>
Type something with "gif me funny cat" to see what happens ;)
</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
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