Update BrainBot.py
Browse files- 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
|
| 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()
|