如何使JSON输出达到简化的正常输出?
我有一个代码,可以像下面的输出一样提供输出
{
"Pdf":"July 20.pdf"
"Content":"Include any error messages"
"Page no":6
}
{
"Pdf":"July 20, 2016.pdf"
"Content":"Show what you’ve tried and tell us"
"Page no":7
}
,但是我需要输出,就像
"Pdf":"July 20.pdf", "Content":"Include any error messages", "Page no":6
"Pdf":"July 20, 2016.pdf", "Content":"Show what you’ve tried and tell us", "Page no":7
我在简化上一样。 代码吗?
results = search(query, top_k=2, index=index, model=search_model)
for result in results:
st.write(result)
以下是任何人可以帮助我的
I have a code which gives output like below
{
"Pdf":"July 20.pdf"
"Content":"Include any error messages"
"Page no":6
}
{
"Pdf":"July 20, 2016.pdf"
"Content":"Show what you’ve tried and tell us"
"Page no":7
}
But i need output like
"Pdf":"July 20.pdf", "Content":"Include any error messages", "Page no":6
"Pdf":"July 20, 2016.pdf", "Content":"Show what you’ve tried and tell us", "Page no":7
I'm working on streamlit. Below is the code
results = search(query, top_k=2, index=index, model=search_model)
for result in results:
st.write(result)
Can anyone help me with this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将其打印为字符串并更换一些字符。
代码
输出
Print it as a string and replace some chars.
Code
Output