Update app.py
Browse files
app.py
CHANGED
|
@@ -16,6 +16,9 @@ os.makedirs(CHAT_HISTORY_DIR, exist_ok=True)
|
|
| 16 |
# Streamlit Configurations
|
| 17 |
st.set_page_config(page_title="🐶 DUBSChat", layout="wide")
|
| 18 |
|
|
|
|
|
|
|
|
|
|
| 19 |
# Utility Functions
|
| 20 |
def save_chat_history(session_name, messages):
|
| 21 |
"""
|
|
@@ -103,7 +106,7 @@ if prompt := st.chat_input():
|
|
| 103 |
response = requests.post(
|
| 104 |
SPACE_URL,
|
| 105 |
json={"prompt": chat_history},
|
| 106 |
-
headers={"Authorization": f"Bearer {
|
| 107 |
timeout=60,
|
| 108 |
)
|
| 109 |
response.raise_for_status()
|
|
|
|
| 16 |
# Streamlit Configurations
|
| 17 |
st.set_page_config(page_title="🐶 DUBSChat", layout="wide")
|
| 18 |
|
| 19 |
+
with st.sidebar:
|
| 20 |
+
dubs_key = st.text_input("Enter Dubs Key", key="chatbot_api_key", type="password")
|
| 21 |
+
|
| 22 |
# Utility Functions
|
| 23 |
def save_chat_history(session_name, messages):
|
| 24 |
"""
|
|
|
|
| 106 |
response = requests.post(
|
| 107 |
SPACE_URL,
|
| 108 |
json={"prompt": chat_history},
|
| 109 |
+
headers={"Authorization": f"Bearer {dubs_key}"},
|
| 110 |
timeout=60,
|
| 111 |
)
|
| 112 |
response.raise_for_status()
|