Ejemplo n.º 1
0
def echo(message):
    from werobot.reply import ArticlesReply, Article 
    from interface import face 

    reply = ArticlesReply(message=message)
    article = Article(
        title = "智能测试心理年龄",
        description = face(message.img),
        img = message.img,
        url = "http://mp.weixin.qq.com/s?__biz=MzIwNjE2Mjg5NA==&mid=402671317&idx=1&sn=5abcb6337a32d66248cfd06504c29401#rd"
    )
    reply.add_article(article)
    return reply
Ejemplo n.º 2
0
def echo(message):
    from werobot.reply import ArticlesReply, Article
    from interface import face

    reply = ArticlesReply(message=message)
    article = Article(
        title="智能测试心理年龄",
        description=face(message.img),
        img=message.img,
        url=
        "http://mp.weixin.qq.com/s?__biz=MzIwNjE2Mjg5NA==&mid=402671317&idx=1&sn=5abcb6337a32d66248cfd06504c29401#rd"
    )
    reply.add_article(article)
    return reply
Ejemplo n.º 3
0
# -*- coding: utf-8 -*-
import sys
print sys.getdefaultencoding()
reload(sys)
sys.setdefaultencoding('utf-8')

from interface import face
img = IMAGE_DIR = 'http://cn.faceplusplus.com/static/resources/python_demo/1.jpg'
print face(img)

#from interface import youdao
#words = [ 'we are friend' , 'I love you', 'aaaaa', 'please help me to remove the table', 'deske']
#for word  in words:
#	reply = youdao(word)
#	print reply
#
#from interface import turling
#words = [ '你好\n' , '我帅吗','你几岁了','薛定谔定力','笑话','笑话','笑话']
#for word  in words:
#	reply = turling(word)
#	print word
#	print reply
#
Ejemplo n.º 4
0
# -*- coding: utf-8 -*-
import sys

print sys.getdefaultencoding()
reload(sys)
sys.setdefaultencoding('utf-8')

from interface import face

img = IMAGE_DIR = 'http://cn.faceplusplus.com/static/resources/python_demo/1.jpg'
print face(img)

#from interface import youdao
#words = [ 'we are friend' , 'I love you', 'aaaaa', 'please help me to remove the table', 'deske']
#for word  in words:
#	reply = youdao(word)
#	print reply
#
#from interface import turling
#words = [ '你好\n' , '我帅吗','你几岁了','薛定谔定力','笑话','笑话','笑话']
#for word  in words:
#	reply = turling(word)
#	print word
#	print reply
#