Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -33,7 +33,9 @@ if 'responses' not in st.session_state:
|
|
| 33 |
st.title('SlimshadowGPT')
|
| 34 |
st.write("This is a simple interface to interact with the GPT-3.5 API.")
|
| 35 |
|
| 36 |
-
|
|
|
|
|
|
|
| 37 |
|
| 38 |
if st.button('Send'):
|
| 39 |
if user_input:
|
|
@@ -49,7 +51,7 @@ if st.button('Send'):
|
|
| 49 |
st.write("Failed to get a response from the API.")
|
| 50 |
|
| 51 |
# Clear input box after sending
|
| 52 |
-
|
| 53 |
|
| 54 |
# Display the conversation history
|
| 55 |
st.write("### Chat History")
|
|
|
|
| 33 |
st.title('SlimshadowGPT')
|
| 34 |
st.write("This is a simple interface to interact with the GPT-3.5 API.")
|
| 35 |
|
| 36 |
+
# Placeholder for user input
|
| 37 |
+
input_placeholder = st.empty()
|
| 38 |
+
user_input = input_placeholder.text_input("Enter your message:")
|
| 39 |
|
| 40 |
if st.button('Send'):
|
| 41 |
if user_input:
|
|
|
|
| 51 |
st.write("Failed to get a response from the API.")
|
| 52 |
|
| 53 |
# Clear input box after sending
|
| 54 |
+
input_placeholder.text_input("Enter your message:", value="", key="user_input_clear")
|
| 55 |
|
| 56 |
# Display the conversation history
|
| 57 |
st.write("### Chat History")
|