Skip to content

Commit

Permalink
Merge 47292bb into a586c2f
Browse files Browse the repository at this point in the history
  • Loading branch information
Priya997 committed Jul 29, 2018
2 parents a586c2f + 47292bb commit 2886776
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cover/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1220,7 +1220,7 @@ <h1>Coverage report:
<div class="content">
<p>
<a class="nav" href="https://coverage.readthedocs.io">coverage.py v4.4.2</a>,
created at 2018-07-26 13:12
created at 2018-07-27 13:04
</p>
</div>
</div>
Expand Down
3 changes: 1 addition & 2 deletions cover/skf_api_chatbot_business_py.html
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ <h2 class="stats">
<p id="n83" class="stm mis"><a href="#n83">83</a></p>
<p id="n84" class="stm mis"><a href="#n84">84</a></p>
<p id="n85" class="stm mis"><a href="#n85">85</a></p>

</td>
<td class="text">
<p id="t1" class="stm run hide_run"><span class="key">import</span> <span class="nam">json</span><span class="op">,</span> <span class="nam">nltk</span><span class="op">,</span> <span class="nam">os</span><span class="strut">&nbsp;</span></p>
Expand Down Expand Up @@ -250,7 +249,7 @@ <h2 class="stats">
<div class="content">
<p>
<a class="nav" href="index.html">&#xab; index</a> &nbsp; &nbsp; <a class="nav" href="https://coverage.readthedocs.io">coverage.py v4.4.2</a>,
created at 2018-07-26 13:00
created at 2018-07-27 13:04
</p>
</div>
</div>
Expand Down
6 changes: 5 additions & 1 deletion cover/skf_api_chatbot_endpoints_chatbot_question_py.html
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,10 @@ <h2 class="stats">
<p id="n44" class="pln"><a href="#n44">44</a></p>
<p id="n45" class="stm run hide_run"><a href="#n45">45</a></p>
<p id="n46" class="stm run hide_run"><a href="#n46">46</a></p>

<p id="n47" class="pln"><a href="#n47">47</a></p>


</td>
<td class="text">
<p id="t1" class="stm run hide_run"><span class="key">from</span> <span class="nam">flask</span> <span class="key">import</span> <span class="nam">request</span><span class="strut">&nbsp;</span></p>
Expand Down Expand Up @@ -165,6 +167,7 @@ <h2 class="stats">
<p id="t46" class="stm run hide_run"> <span class="key">return</span> <span class="nam">result</span><span class="op">,</span> <span class="num">200</span><span class="op">,</span> <span class="nam">security_headers</span><span class="op">(</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
<p id="t47" class="pln"><span class="strut">&nbsp;</span></p>


</td>
</tr>
</table>
Expand All @@ -174,7 +177,8 @@ <h2 class="stats">
<div class="content">
<p>
<a class="nav" href="index.html">&#xab; index</a> &nbsp; &nbsp; <a class="nav" href="https://coverage.readthedocs.io">coverage.py v4.4.2</a>,
created at 2018-07-26 12:52
created at 2018-07-27 13:04

</p>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion cover/status.json

Large diffs are not rendered by default.

13 changes: 11 additions & 2 deletions skf/api/chatbot/business.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ def des_sol(question,intent):
entity[i]=intent+" "+entity[i]
return entity
else:
log=open(os.path.join(app.root_path,"logs.txt"),"a")
msg="Please be more specific"
log.write(question+"\n")
log.close()
return msg

def code(question,intent,language):
Expand Down Expand Up @@ -76,9 +79,15 @@ def code(question,intent,language):
else:
if language is None:
language=str(code_entity[-1].strip("\n").lower())
else:
elif language:
language=language
else:
log=open(os.path.join(app.root_path,"logs.txt"),"a")
msg="Please be more specific"
log.write(question+"\n")
log.close()
return msg
code_list={}
for i in code_entity[0]:
code_list[i]=intent+" "+code_entity[0][i]
return code_list
return code_list
Empty file added skf/api/chatbot/logs.txt
Empty file.

0 comments on commit 2886776

Please sign in to comment.