Spaces:
Sleeping
Sleeping
Jonas Wiesli
commited on
Commit
•
6ac6a23
1
Parent(s):
547e5c5
added grid layout
Browse files
app.py
CHANGED
@@ -46,12 +46,17 @@ with gr.Blocks() as iface:
|
|
46 |
|
47 |
i = 0
|
48 |
while i < len(roles):
|
49 |
-
with gr.
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
|
|
|
|
|
|
|
|
|
|
55 |
|
56 |
def user(user_message, history):
|
57 |
return "", history + [[user_message, None]]
|
@@ -86,8 +91,8 @@ with gr.Blocks() as iface:
|
|
86 |
if checkIfQuestionsLeft(prevText):
|
87 |
message_history = [
|
88 |
{"role": "system", "content": initText[characterId] + "Stay in character. Use natural language. Don't "
|
89 |
-
"reveal all of the information in a single
|
90 |
-
" and leave hints. "}
|
91 |
]
|
92 |
for pair in history:
|
93 |
message_history.append({"role": "user", "content": pair[0]})
|
|
|
46 |
|
47 |
i = 0
|
48 |
while i < len(roles):
|
49 |
+
with gr.Row():
|
50 |
+
with gr.Column(scale=2):
|
51 |
+
questionCounter = gr.Label(value="Remaining Questions: 24")
|
52 |
+
finishButton = gr.Button()
|
53 |
+
with gr.Column(scale=8):
|
54 |
+
with gr.Tab(roles[i]):
|
55 |
+
chatbot.append(gr.Chatbot())
|
56 |
+
msg.append(gr.Textbox())
|
57 |
+
i += 1
|
58 |
+
with gr.Column(scale=2):
|
59 |
+
characterImage = gr.Image()
|
60 |
|
61 |
def user(user_message, history):
|
62 |
return "", history + [[user_message, None]]
|
|
|
91 |
if checkIfQuestionsLeft(prevText):
|
92 |
message_history = [
|
93 |
{"role": "system", "content": initText[characterId] + "Stay in character. Use natural language. Don't "
|
94 |
+
"reveal all of the information in a single "
|
95 |
+
"message, and leave hints. "}
|
96 |
]
|
97 |
for pair in history:
|
98 |
message_history.append({"role": "user", "content": pair[0]})
|