Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -10,6 +10,7 @@ client = AI71(ai71_api_key)
|
|
10 |
# Set page config with title and favicon
|
11 |
st.set_page_config(
|
12 |
page_title="AI Lawyer 🧑⚖️",
|
|
|
13 |
)
|
14 |
|
15 |
# Add custom CSS for styling
|
@@ -66,10 +67,12 @@ st.write(
|
|
66 |
"This is your AI Lawyer that uses the AI71 model to provide legal advice and information."
|
67 |
)
|
68 |
|
69 |
-
#
|
70 |
-
# messages persist across reruns.
|
71 |
if "messages" not in st.session_state:
|
72 |
st.session_state.messages = []
|
|
|
|
|
|
|
73 |
instruction = "Hi! This is your AI Lawyer 🧑⚖️. Please describe your legal question or issue. For example: 'I need help understanding a contract clause.'"
|
74 |
st.session_state.messages.append({"role": "assistant", "content": instruction})
|
75 |
|
|
|
10 |
# Set page config with title and favicon
|
11 |
st.set_page_config(
|
12 |
page_title="AI Lawyer 🧑⚖️",
|
13 |
+
page_icon="assets/lawyer_icon.png", # Replace with your favicon path
|
14 |
)
|
15 |
|
16 |
# Add custom CSS for styling
|
|
|
67 |
"This is your AI Lawyer that uses the AI71 model to provide legal advice and information."
|
68 |
)
|
69 |
|
70 |
+
# Initialize session state variables if not already set
|
|
|
71 |
if "messages" not in st.session_state:
|
72 |
st.session_state.messages = []
|
73 |
+
st.session_state.max_tokens = 512
|
74 |
+
st.session_state.temperature = 0.7
|
75 |
+
st.session_state.top_p = 0.95
|
76 |
instruction = "Hi! This is your AI Lawyer 🧑⚖️. Please describe your legal question or issue. For example: 'I need help understanding a contract clause.'"
|
77 |
st.session_state.messages.append({"role": "assistant", "content": instruction})
|
78 |
|