Show thoughts
')
response = response.replace("", "
")
return response
css = """
.thoughts {
border: 1px solid #ccc;
padding: 10px;
background-color: #f9f9f9;
border-radius: 5px;
}
details summary {
cursor: pointer;
padding: 5px;
background-color: #e0e0e0;
border-radius: 5px;
font-weight: bold;
}
details summary::-webkit-details-marker {
display: none;
}
details summary:after {
content: " ▶";
}
details[open] summary:after {
content: " ▼";
}
"""
with gr.Blocks(css=css) as demo:
gr.Markdown("## Chat with Superthoughts")
gr.Markdown("**Warning:** The first output from the AI may take a few moments. After the first message, it should work quickly.")
chatbot = gr.Chatbot()
msg = gr.Textbox()
system_message = gr.Textbox(value="You must always include