Add much nicer layout
Browse files- streamlit_app.py +23 -10
streamlit_app.py
CHANGED
|
@@ -58,19 +58,32 @@ def server():
|
|
| 58 |
|
| 59 |
summary = "high_level_global_summary"
|
| 60 |
|
| 61 |
-
|
|
|
|
| 62 |
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 68 |
|
| 69 |
-
st.button("Random sample", on_click=random_sample_btn, args=[ds.num_rows])
|
| 70 |
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
|
|
|
|
|
|
|
|
|
| 74 |
|
| 75 |
|
| 76 |
if __name__ == "__main__":
|
|
|
|
| 58 |
|
| 59 |
summary = "high_level_global_summary"
|
| 60 |
|
| 61 |
+
row1 = st.container(border=True, height=400)
|
| 62 |
+
row2 = st.container(border=True, height=400)
|
| 63 |
|
| 64 |
+
with row1:
|
| 65 |
+
col1, col2 = st.columns(2)
|
| 66 |
+
|
| 67 |
+
with col1:
|
| 68 |
+
code_input("System prompt", system_prompt)
|
| 69 |
+
|
| 70 |
+
with col2:
|
| 71 |
+
description_prompt = ds['description'][idx][summary]
|
| 72 |
+
code_input("User prompt", description_prompt)
|
| 73 |
+
|
| 74 |
+
with row2:
|
| 75 |
+
col1, col2 = st.columns(2)
|
| 76 |
+
|
| 77 |
+
with col1:
|
| 78 |
+
code_input("Expected response", ds['code'][idx])
|
| 79 |
|
|
|
|
| 80 |
|
| 81 |
+
with col2:
|
| 82 |
+
code_input("LLM response", st.session_state['response'], edit_disabled=True)
|
| 83 |
+
|
| 84 |
+
with st.container(horizontal=True):
|
| 85 |
+
st.button("Random sample", on_click=random_sample_btn, args=[ds.num_rows])
|
| 86 |
+
st.button("Generate", on_click=generate_btn, args=[model, description_prompt])
|
| 87 |
|
| 88 |
|
| 89 |
if __name__ == "__main__":
|