eagle0504 commited on
Commit
8181d11
·
verified ·
1 Parent(s): 1c4b7c5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +27 -2
app.py CHANGED
@@ -1,5 +1,6 @@
1
  import streamlit as st
2
  import os
 
3
  from together import Together
4
 
5
 
@@ -66,7 +67,8 @@ with st.sidebar:
66
  st.experimental_rerun()
67
 
68
 
69
- st.title("Meta Llama3 🦙")
 
70
 
71
 
72
  # Initialize chat history
@@ -88,6 +90,11 @@ judge = call_llama
88
 
89
  # React to user input
90
  iter = 0
 
 
 
 
 
91
  if submit_button:
92
 
93
  # Initiatization
@@ -142,9 +149,27 @@ if submit_button:
142
  )
143
 
144
  # Stopping rule
145
- if '9' in judge_comments:
 
146
  break
147
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
148
  # Checkpoint
149
  iter += 1
150
 
 
1
  import streamlit as st
2
  import os
3
+ import pandas as pd
4
  from together import Together
5
 
6
 
 
67
  st.experimental_rerun()
68
 
69
 
70
+ st.set_page_config(layout="wide")
71
+ st.title("Duel Agent Simulation 🦙🦙")
72
 
73
 
74
  # Initialize chat history
 
90
 
91
  # React to user input
92
  iter = 0
93
+ list_of_iters = []
94
+ list_of_questions = []
95
+ list_of_answers = []
96
+ list_of_judge_comments = []
97
+ list_of_passes = []
98
  if submit_button:
99
 
100
  # Initiatization
 
149
  )
150
 
151
  # Stopping rule
152
+ passed_or_not = 1 if '8' in judge_comments else 0
153
+ if '8' in judge_comments:
154
  break
155
 
156
+ # Collect all responses
157
+ list_of_iters.append(iter)
158
+ list_of_questions.append(question)
159
+ list_of_answers.append(answer)
160
+ list_of_judge_comments.append(judge_comments)
161
+ list_of_passes.append(passed_or_not)
162
+ results_tab = pd.DataFrame({
163
+ "Iter.": list_of_iters,
164
+ "Questions": list_of_questions,
165
+ "Answers": list_of_answers,
166
+ "Judge Comments": list_of_judge_comments,
167
+ "Passed": list_of_passes
168
+ })
169
+
170
+ with st.expander("See explanation"):
171
+ st.table(results_tab)
172
+
173
  # Checkpoint
174
  iter += 1
175