Spaces:
Sleeping
Sleeping
Update vlog4debate.py
Browse files- vlog4debate.py +13 -17
vlog4debate.py
CHANGED
@@ -174,23 +174,19 @@ class Debate:
|
|
174 |
|
175 |
def run(self):
|
176 |
for round in range(self.max_round - 1):
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
self.moderator.add_event(self.config['moderator_prompt'].replace('##aff_ans##', self.aff_ans).replace('##neg_ans##', self.neg_ans).replace('##round##', self.round_dct(round+2)))
|
191 |
-
self.mod_ans = self.moderator.ask()
|
192 |
-
self.moderator.add_memory(self.mod_ans)
|
193 |
-
self.mod_ans = eval(self.mod_ans)
|
194 |
|
195 |
if self.mod_ans["debate_answer"] != '':
|
196 |
self.config.update(self.mod_ans)
|
|
|
174 |
|
175 |
def run(self):
|
176 |
for round in range(self.max_round - 1):
|
177 |
+
print(f"===== Debate Round-{round+1} =====\n")
|
178 |
+
self.affirmative.add_event(self.config['debate_prompt'].replace('##oppo_ans##', self.neg_ans))
|
179 |
+
self.aff_ans = self.affirmative.ask()
|
180 |
+
self.affirmative.add_memory(self.aff_ans)
|
181 |
+
|
182 |
+
self.negative.add_event(self.config['debate_prompt'].replace('##oppo_ans##', self.aff_ans))
|
183 |
+
self.neg_ans = self.negative.ask()
|
184 |
+
self.negative.add_memory(self.neg_ans)
|
185 |
+
|
186 |
+
self.moderator.add_event(self.config['moderator_prompt'].replace('##aff_ans##', self.aff_ans).replace('##neg_ans##', self.neg_ans).replace('##round##', self.round_dct(round+2)))
|
187 |
+
self.mod_ans = self.moderator.ask()
|
188 |
+
self.moderator.add_memory(self.mod_ans)
|
189 |
+
self.mod_ans = eval(self.mod_ans)
|
|
|
|
|
|
|
|
|
190 |
|
191 |
if self.mod_ans["debate_answer"] != '':
|
192 |
self.config.update(self.mod_ans)
|