hertogateis commited on
Commit
9577e76
·
verified ·
1 Parent(s): 1b5197f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -14
app.py CHANGED
@@ -2,7 +2,7 @@ import streamlit as st
2
  import requests
3
 
4
  # Replace with your DeepSeek API key and endpoint
5
- DEEPSEEK_API_KEY = "sk-cb27c81768e443868a194fad0bb91abc"
6
  DEEPSEEK_ENDPOINT = "https://api.deepseek.com/v1/chat"
7
 
8
  # Define the bot's persona
@@ -53,16 +53,4 @@ def main():
53
  st.text_area("You", value=user_input, height=50, disabled=True)
54
  st.text_area("Nietzsche", value=bot_response, height=100, disabled=True)
55
 
56
- # User input
57
- user_input = st.text_input("Your Question", placeholder="Ask Nietzsche...")
58
-
59
- # Submit button
60
- if st.button("Submit"):
61
- if user_input.strip(): # Check if input is not empty
62
- bot_response = chat_with_nietzsche(user_input)
63
- st.session_state.history.append((user_input, bot_response))
64
- st.experimental_rerun() # Refresh the app to display the new response
65
-
66
- # Run the Streamlit app
67
- if __name__ == "__main__":
68
- main()
 
2
  import requests
3
 
4
  # Replace with your DeepSeek API key and endpoint
5
+ DEEPSEEK_API_KEY = "your_deepseek_api_key"
6
  DEEPSEEK_ENDPOINT = "https://api.deepseek.com/v1/chat"
7
 
8
  # Define the bot's persona
 
53
  st.text_area("You", value=user_input, height=50, disabled=True)
54
  st.text_area("Nietzsche", value=bot_response, height=100, disabled=True)
55
 
56
+ # User input