app.py
Browse files
app.py
CHANGED
@@ -26,7 +26,7 @@ SUPPORTED_AUDIO_FORMATS = (".mp3", ".wav", ".m4a")
|
|
26 |
SUPPORTED_TEXT_FORMATS = (".txt", ".docx", ".csv", ".xlsx", ".pdf")
|
27 |
|
28 |
|
29 |
-
def contract_chat_section(tab, assistant_id, session_key):
|
30 |
with tab:
|
31 |
st.subheader("Chat")
|
32 |
|
@@ -47,7 +47,7 @@ def contract_chat_section(tab, assistant_id, session_key):
|
|
47 |
role, content = message["role"], message["content"]
|
48 |
st.chat_message(role).write(content)
|
49 |
|
50 |
-
if prompt := st.chat_input():
|
51 |
st.session_state[session_key].append({"role": "user", "content": prompt})
|
52 |
st.chat_message("user").write(prompt)
|
53 |
|
@@ -79,13 +79,13 @@ def contract_chat_section(tab, assistant_id, session_key):
|
|
79 |
st.error(f"Error: {str(e)}")
|
80 |
|
81 |
ASSISTANT_CONTRACT_ID = "asst_rd9h8PfYuOmHbkvOF3RTmVfn"
|
82 |
-
ASSISTANT_TECHNICAL_ID = "
|
83 |
|
84 |
# Contract Chat Section
|
85 |
-
contract_chat_section(tab1, ASSISTANT_CONTRACT_ID, "contract_messages")
|
86 |
|
87 |
# Technical Chat Section
|
88 |
-
contract_chat_section(tab2, ASSISTANT_TECHNICAL_ID, "technical_messages")
|
89 |
|
90 |
with tab3:
|
91 |
st.subheader("Minutes")
|
@@ -164,4 +164,4 @@ with tab3:
|
|
164 |
st.session_state["generated_minutes"] = response.choices[0].message.content
|
165 |
|
166 |
st.write("### Generated Meeting Minutes:")
|
167 |
-
st.text_area("Meeting Minutes", st.session_state["generated_minutes"], height=400)
|
|
|
26 |
SUPPORTED_TEXT_FORMATS = (".txt", ".docx", ".csv", ".xlsx", ".pdf")
|
27 |
|
28 |
|
29 |
+
def contract_chat_section(tab, assistant_id, session_key, input_key):
|
30 |
with tab:
|
31 |
st.subheader("Chat")
|
32 |
|
|
|
47 |
role, content = message["role"], message["content"]
|
48 |
st.chat_message(role).write(content)
|
49 |
|
50 |
+
if prompt := st.chat_input("Enter your message:", key=input_key):
|
51 |
st.session_state[session_key].append({"role": "user", "content": prompt})
|
52 |
st.chat_message("user").write(prompt)
|
53 |
|
|
|
79 |
st.error(f"Error: {str(e)}")
|
80 |
|
81 |
ASSISTANT_CONTRACT_ID = "asst_rd9h8PfYuOmHbkvOF3RTmVfn"
|
82 |
+
ASSISTANT_TECHNICAL_ID = "asst_xizNZBCJuy4TqdjqjwkxbAki"
|
83 |
|
84 |
# Contract Chat Section
|
85 |
+
contract_chat_section(tab1, ASSISTANT_CONTRACT_ID, "contract_messages", "contract_input")
|
86 |
|
87 |
# Technical Chat Section
|
88 |
+
contract_chat_section(tab2, ASSISTANT_TECHNICAL_ID, "technical_messages", "technical_input")
|
89 |
|
90 |
with tab3:
|
91 |
st.subheader("Minutes")
|
|
|
164 |
st.session_state["generated_minutes"] = response.choices[0].message.content
|
165 |
|
166 |
st.write("### Generated Meeting Minutes:")
|
167 |
+
st.text_area("Meeting Minutes", st.session_state["generated_minutes"], height=400)
|