Spaces:
Runtime error
Runtime error
role1_content = f"{structured_dialogue[i]['content']}"
Browse files
app.py
CHANGED
@@ -101,8 +101,8 @@ def main_function(password: str, theme: str, language: str, method: str, rounds:
|
|
101 |
chatbot_dialogue = []
|
102 |
for i in range(0, len(structured_dialogue), 2): # We iterate with a step of 2 to take pairs
|
103 |
# Get the content for the two roles in the pair
|
104 |
-
role1_content = f"{structured_dialogue[i]['
|
105 |
-
role2_content = f"{structured_dialogue[i+1]['
|
106 |
|
107 |
chatbot_dialogue.append((role1_content, role2_content))
|
108 |
|
|
|
101 |
chatbot_dialogue = []
|
102 |
for i in range(0, len(structured_dialogue), 2): # We iterate with a step of 2 to take pairs
|
103 |
# Get the content for the two roles in the pair
|
104 |
+
role1_content = f"{structured_dialogue[i]['content']}"
|
105 |
+
role2_content = f"{structured_dialogue[i+1]['content']}" if i+1 < len(structured_dialogue) else ""
|
106 |
|
107 |
chatbot_dialogue.append((role1_content, role2_content))
|
108 |
|