aminaj commited on
Commit
82c78fb
1 Parent(s): b76ac2f

Update BrainBot.py

Browse files
Files changed (1) hide show
  1. BrainBot.py +1 -6
BrainBot.py CHANGED
@@ -83,13 +83,8 @@ with col3:
83
  try:
84
  FASTAPI_URL = "http://localhost:8000/set_api_key"
85
  data = {"api_key": openai_api_key}
86
- TOKEN = os.getenv("HF_TOKEN")
87
- headers = {
88
- "Authorization": f"Bearer {TOKEN}", # For token-based authentication
89
- "Content-Type": "application/json"
90
- }
91
  if openai_api_key:
92
- response = requests.post(FASTAPI_URL, json=data, headers=headers)
93
  st.sidebar.success(response.text)
94
  st.session_state['api_key_flag'] = True
95
  st.experimental_rerun()
 
83
  try:
84
  FASTAPI_URL = "http://localhost:8000/set_api_key"
85
  data = {"api_key": openai_api_key}
 
 
 
 
 
86
  if openai_api_key:
87
+ response = requests.post(FASTAPI_URL, json=data)
88
  st.sidebar.success(response.text)
89
  st.session_state['api_key_flag'] = True
90
  st.experimental_rerun()