Spaces:
Sleeping
Sleeping
Update chatbot
Browse files- chatbot.py +12 -12
chatbot.py
CHANGED
|
@@ -95,18 +95,6 @@ def render_chatbot(code: str, output: str, error: str):
|
|
| 95 |
</style>
|
| 96 |
""",
|
| 97 |
unsafe_allow_html=True)
|
| 98 |
-
|
| 99 |
-
# Chat history in a scrollable container
|
| 100 |
-
chat_container = st.container()
|
| 101 |
-
with chat_container:
|
| 102 |
-
for q, a in st.session_state.conversation:
|
| 103 |
-
st.markdown(
|
| 104 |
-
f'<div class="chat-message user-message">**You:** {q}</div>',
|
| 105 |
-
unsafe_allow_html=True)
|
| 106 |
-
st.markdown(
|
| 107 |
-
f'<div class="chat-message bot-message">**Assistant:** {a}</div>',
|
| 108 |
-
unsafe_allow_html=True)
|
| 109 |
-
|
| 110 |
# Input area
|
| 111 |
user_input = st.text_input("Ask about your code...",
|
| 112 |
key="chat_input",
|
|
@@ -130,3 +118,15 @@ def render_chatbot(code: str, output: str, error: str):
|
|
| 130 |
with st.expander("📝 Conversation Summary", expanded=False):
|
| 131 |
st.markdown(summary)
|
| 132 |
st.audio(audio_file, format="audio/wav")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 95 |
</style>
|
| 96 |
""",
|
| 97 |
unsafe_allow_html=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 98 |
# Input area
|
| 99 |
user_input = st.text_input("Ask about your code...",
|
| 100 |
key="chat_input",
|
|
|
|
| 118 |
with st.expander("📝 Conversation Summary", expanded=False):
|
| 119 |
st.markdown(summary)
|
| 120 |
st.audio(audio_file, format="audio/wav")
|
| 121 |
+
|
| 122 |
+
# Chat history in a scrollable container
|
| 123 |
+
chat_container = st.container()
|
| 124 |
+
with chat_container:
|
| 125 |
+
for q, a in st.session_state.conversation:
|
| 126 |
+
st.markdown(
|
| 127 |
+
f'<div class="chat-message user-message">**You:** {q}</div>',
|
| 128 |
+
unsafe_allow_html=True)
|
| 129 |
+
st.markdown(
|
| 130 |
+
f'<div class="chat-message bot-message">**Assistant:** {a}</div>',
|
| 131 |
+
unsafe_allow_html=True)
|
| 132 |
+
|