Spaces:
Sleeping
Sleeping
GitHub Actions commited on
Commit ·
869fd94
1
Parent(s): 8117f33
Sync from GitHub Actions
Browse files
app.py
CHANGED
|
@@ -43,7 +43,10 @@ if pipeline:
|
|
| 43 |
with st.chat_message("assistant"):
|
| 44 |
with st.spinner("Thinking..."):
|
| 45 |
response = pipeline.predict(prompt)
|
| 46 |
-
|
|
|
|
|
|
|
|
|
|
| 47 |
st.markdown(formatted_response)
|
| 48 |
|
| 49 |
st.session_state.messages.append({"role": "assistant", "content": formatted_response})
|
|
|
|
| 43 |
with st.chat_message("assistant"):
|
| 44 |
with st.spinner("Thinking..."):
|
| 45 |
response = pipeline.predict(prompt)
|
| 46 |
+
cleaned_response = response.replace(
|
| 47 |
+
"You are a senior Python developer. Provide clear, correct, well-commented code.", ""
|
| 48 |
+
).strip()
|
| 49 |
+
formatted_response = f"```python\n{cleaned_response}\n```"
|
| 50 |
st.markdown(formatted_response)
|
| 51 |
|
| 52 |
st.session_state.messages.append({"role": "assistant", "content": formatted_response})
|