Spaces:
Running
Running
App.py: panel lead choice
#2
by KaanS139 - opened
app.py
CHANGED
|
@@ -82,15 +82,21 @@ with tab_panel:
|
|
| 82 |
|
| 83 |
temperature = st.text_input("Temperature", value=0.1)
|
| 84 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 85 |
submitted = st.form_submit_button("Submit")
|
| 86 |
|
| 87 |
if requires_openai_key(llm_ver) and not get_openai_api_key():
|
| 88 |
st.info("Please add your OpenAI API key to continue.")
|
| 89 |
elif submitted:
|
|
|
|
|
|
|
| 90 |
response = generate_panel_response(
|
| 91 |
text,
|
| 92 |
-
llm_panelists=
|
| 93 |
-
llm_panel_chair=
|
| 94 |
temperature=temperature,
|
| 95 |
)
|
| 96 |
|
|
|
|
| 82 |
|
| 83 |
temperature = st.text_input("Temperature", value=0.1)
|
| 84 |
|
| 85 |
+
###Start of Kaan Changes
|
| 86 |
+
#Selectbox to determine which LLM becomes panel lead
|
| 87 |
+
panel_lead = st.selectbox("Which LLM would you like to lead this panel?", PREF_ORDER_LLMS)
|
| 88 |
+
|
| 89 |
submitted = st.form_submit_button("Submit")
|
| 90 |
|
| 91 |
if requires_openai_key(llm_ver) and not get_openai_api_key():
|
| 92 |
st.info("Please add your OpenAI API key to continue.")
|
| 93 |
elif submitted:
|
| 94 |
+
#Create new list of LLMs that does not include panel lead
|
| 95 |
+
llm_panelists = [llm for llm in PREF_ORDER_LLMS if llm !=panel_lead]
|
| 96 |
response = generate_panel_response(
|
| 97 |
text,
|
| 98 |
+
llm_panelists=llm_panelists,
|
| 99 |
+
llm_panel_chair=panel_lead,
|
| 100 |
temperature=temperature,
|
| 101 |
)
|
| 102 |
|