我在Python中使用indicoioapi。我无法理解如何从API请求输出。以下是我迄今为止所做的:
当我使用Pycharm或Idle中的API键编写此代码时,什么都没有发生,我得到“processfinishedwithexitcode0”或语法错误
import indicoio
indicoio.config.api_key = 'xxxxxxxxxxxxxxxxxxxx'
# single example
indicoio.sentiment("I love writing code!")
# batch example
indicoio.sentiment([
"I love writing code!",
"Alexander and the Terrible, Horrible, No Good, Very Bad Day"
])
以下是文档:https://indico.io/docs
你的代码运行得很好,但实际上你并没有告诉它打印任何东西。你知道吗
试着用这样的打印语句包装您的通话:
相关问题 更多 >
编程相关推荐