Spaces:
Running
Running
Reorganised layout to fit extra LLMs
#8
by KaanS139 - opened
app.py
CHANGED
|
@@ -8,6 +8,9 @@ from ring import LLM_GPT4
|
|
| 8 |
from ring import LLM_GPT4o
|
| 9 |
from ring import LLM_LLAMA2
|
| 10 |
from ring import LLM_GEMINI
|
|
|
|
|
|
|
|
|
|
| 11 |
from ring import PREF_ORDER_LLMS
|
| 12 |
|
| 13 |
|
|
@@ -16,7 +19,7 @@ from ring import get_openai_api_key
|
|
| 16 |
from ring import generate_response
|
| 17 |
from ring import generate_panel_response
|
| 18 |
|
| 19 |
-
__version__ = "0.2.
|
| 20 |
|
| 21 |
col1, col2 = st.columns([3, 1])
|
| 22 |
|
|
@@ -84,6 +87,10 @@ with tab_panel:
|
|
| 84 |
|
| 85 |
###Start of Kaan Changes
|
| 86 |
# Selectbox to determine which LLM becomes panel lead
|
|
|
|
|
|
|
|
|
|
|
|
|
| 87 |
panel_lead = st.radio(
|
| 88 |
"Which LLM would you like to lead this panel?",
|
| 89 |
PREF_ORDER_LLMS,
|
|
@@ -97,14 +104,17 @@ with tab_panel:
|
|
| 97 |
)
|
| 98 |
options = PREF_ORDER_LLMS # [llm for llm in PREF_ORDER_LLMS if llm !=panel_lead] creates a list of options excluding the chosen panel lead
|
| 99 |
selected_options = []
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
if
|
| 107 |
-
|
|
|
|
|
|
|
|
|
|
| 108 |
|
| 109 |
submitted = st.form_submit_button("Submit")
|
| 110 |
|
|
|
|
| 8 |
from ring import LLM_GPT4o
|
| 9 |
from ring import LLM_LLAMA2
|
| 10 |
from ring import LLM_GEMINI
|
| 11 |
+
from ring import LLM_AI21
|
| 12 |
+
from ring import LLM_Claude2
|
| 13 |
+
from ring import LLM_Cohere
|
| 14 |
from ring import PREF_ORDER_LLMS
|
| 15 |
|
| 16 |
|
|
|
|
| 19 |
from ring import generate_response
|
| 20 |
from ring import generate_panel_response
|
| 21 |
|
| 22 |
+
__version__ = "0.2.2"
|
| 23 |
|
| 24 |
col1, col2 = st.columns([3, 1])
|
| 25 |
|
|
|
|
| 87 |
|
| 88 |
###Start of Kaan Changes
|
| 89 |
# Selectbox to determine which LLM becomes panel lead
|
| 90 |
+
st.markdown(
|
| 91 |
+
"<style> .stRadio> div {gap:30px;} </style>",
|
| 92 |
+
unsafe_allow_html=True,
|
| 93 |
+
)
|
| 94 |
panel_lead = st.radio(
|
| 95 |
"Which LLM would you like to lead this panel?",
|
| 96 |
PREF_ORDER_LLMS,
|
|
|
|
| 104 |
)
|
| 105 |
options = PREF_ORDER_LLMS # [llm for llm in PREF_ORDER_LLMS if llm !=panel_lead] creates a list of options excluding the chosen panel lead
|
| 106 |
selected_options = []
|
| 107 |
+
|
| 108 |
+
#Put checkboxes into table arranged 4x2
|
| 109 |
+
for row in range(2): # 2 rows
|
| 110 |
+
cols = st.columns(4) # 4 columns in each row
|
| 111 |
+
for col in range(4): # Iterate over each column
|
| 112 |
+
index = row * 4 + col
|
| 113 |
+
if index < len(options):
|
| 114 |
+
with cols[col]:
|
| 115 |
+
selected = st.checkbox(options[index], key=options[index])
|
| 116 |
+
if selected:
|
| 117 |
+
selected_options.append(options[index])
|
| 118 |
|
| 119 |
submitted = st.form_submit_button("Submit")
|
| 120 |
|