app.py
Browse files
app.py
CHANGED
|
@@ -45,7 +45,7 @@ if not OPENAI_API_KEY:
|
|
| 45 |
st.stop()
|
| 46 |
|
| 47 |
# Tabs
|
| 48 |
-
tab1, tab2 = st.tabs(["Contract", "Technical"])
|
| 49 |
|
| 50 |
FLAGGED_RESPONSES_FILE = "flagged_responses.json"
|
| 51 |
|
|
@@ -142,8 +142,12 @@ ASSISTANT_TECHNICAL_ID = "asst_xizNZBCJuy4TqdjqjwkxbAki"
|
|
| 142 |
contract_chat_section(tab1, ASSISTANT_CONTRACT_ID, "contract_messages", "contract_input")
|
| 143 |
contract_chat_section(tab2, ASSISTANT_TECHNICAL_ID, "technical_messages", "technical_input")
|
| 144 |
|
| 145 |
-
#
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
st.stop()
|
| 46 |
|
| 47 |
# Tabs
|
| 48 |
+
tab1, tab2, tab3 = st.tabs(["Contract", "Technical", "Flagged Responses"])
|
| 49 |
|
| 50 |
FLAGGED_RESPONSES_FILE = "flagged_responses.json"
|
| 51 |
|
|
|
|
| 142 |
contract_chat_section(tab1, ASSISTANT_CONTRACT_ID, "contract_messages", "contract_input")
|
| 143 |
contract_chat_section(tab2, ASSISTANT_TECHNICAL_ID, "technical_messages", "technical_input")
|
| 144 |
|
| 145 |
+
# Flagged Responses Tab
|
| 146 |
+
with tab3:
|
| 147 |
+
st.subheader("Flagged Responses")
|
| 148 |
+
if os.path.exists(FLAGGED_RESPONSES_FILE):
|
| 149 |
+
with open(FLAGGED_RESPONSES_FILE, "r") as file:
|
| 150 |
+
flagged_responses = file.read()
|
| 151 |
+
st.download_button("Download Flagged Responses", data=flagged_responses, file_name="flagged_responses.json", mime="application/json")
|
| 152 |
+
else:
|
| 153 |
+
st.info("No flagged responses available.")
|