Update app.py
Browse files
app.py
CHANGED
|
@@ -43,6 +43,7 @@ def get_saved_sessions():
|
|
| 43 |
with st.sidebar:
|
| 44 |
st.title("📂 Dubs Recall")
|
| 45 |
saved_sessions = get_saved_sessions()
|
|
|
|
| 46 |
|
| 47 |
# Display saved sessions
|
| 48 |
if saved_sessions:
|
|
@@ -103,8 +104,8 @@ if prompt := st.chat_input():
|
|
| 103 |
response = requests.post(
|
| 104 |
SPACE_URL,
|
| 105 |
json={"prompt": chat_history},
|
| 106 |
-
headers={"Authorization": f"Bearer {
|
| 107 |
-
timeout=
|
| 108 |
)
|
| 109 |
response.raise_for_status()
|
| 110 |
full_response = response.json().get("response", "Sorry, something went wrong!")
|
|
|
|
| 43 |
with st.sidebar:
|
| 44 |
st.title("📂 Dubs Recall")
|
| 45 |
saved_sessions = get_saved_sessions()
|
| 46 |
+
dubs_key = st.text_input("Enter Dubs Key", key="chatbot_api_key", type="password")
|
| 47 |
|
| 48 |
# Display saved sessions
|
| 49 |
if saved_sessions:
|
|
|
|
| 104 |
response = requests.post(
|
| 105 |
SPACE_URL,
|
| 106 |
json={"prompt": chat_history},
|
| 107 |
+
headers={"Authorization": f"Bearer {dubs_key}"},
|
| 108 |
+
timeout=120,
|
| 109 |
)
|
| 110 |
response.raise_for_status()
|
| 111 |
full_response = response.json().get("response", "Sorry, something went wrong!")
|