Spaces:
Sleeping
Sleeping
Jonas Wiesli
commited on
Commit
·
573f504
1
Parent(s):
68f82ba
css adjustments
Browse files
app.py
CHANGED
@@ -3,13 +3,17 @@ import openai
|
|
3 |
|
4 |
openai.api_key = "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"
|
5 |
|
6 |
-
theme = gr.themes.Monochrome(
|
7 |
-
|
|
|
|
|
8 |
"background-color:#cda678;font-family:Silkscreen;position:relative}.secondary.svelte-58yet2," \
|
9 |
".tabitem{background-color:#002366}#component-1{min-height:75vh}#component-4{" \
|
10 |
"margin-top:auto}.tabs.svelte-btpldm{height:100%}.tabitem{border:1px solid #fff}#component-9{" \
|
11 |
-
"min-height:70vh;max-height:70vh}#component-10,#component-11
|
12 |
-
"
|
|
|
|
|
13 |
"position:absolute;left:50%;top:50%;transform:translateX(-50%) translateY(" \
|
14 |
"-50%);width:50%;height:50vh;padding:80px 20px 20px;background-color:#fff;border:1px solid " \
|
15 |
"#002366}#component-49{position:initial}#component-50,#component-62{" \
|
@@ -171,7 +175,7 @@ with gr.Blocks(theme=theme, css=css) as iface:
|
|
171 |
def generate_ai_message(history, question_counter_text, character_id):
|
172 |
if check_if_questions_left(question_counter_text):
|
173 |
init_sys_message = initText[character_id] + "Stay in character. Use natural language. Don't reveal all of" \
|
174 |
-
"the information in a single message, and leave hints.
|
175 |
"reveal everything in a single message."
|
176 |
message_history = [
|
177 |
{"role": "system", "content": init_sys_message}
|
|
|
3 |
|
4 |
openai.api_key = "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"
|
5 |
|
6 |
+
theme = gr.themes.Monochrome(
|
7 |
+
text_size="lg"
|
8 |
+
)
|
9 |
+
css = "@import url(https://fonts.googleapis.com/css2?family=Silkscreen:wght@400;700&display=swap);.gradio-container{" \
|
10 |
"background-color:#cda678;font-family:Silkscreen;position:relative}.secondary.svelte-58yet2," \
|
11 |
".tabitem{background-color:#002366}#component-1{min-height:75vh}#component-4{" \
|
12 |
"margin-top:auto}.tabs.svelte-btpldm{height:100%}.tabitem{border:1px solid #fff}#component-9{" \
|
13 |
+
"min-height:70vh;max-height:70vh}#component-10,#component-11,#component-18,#component-19,#component-26," \
|
14 |
+
"#component-27,#component-34,#component-35,#component-42,#component-43,.wrap.svelte-a99nd8{" \
|
15 |
+
"background-color:#aaa}.message.svelte-a99nd8.svelte-a99nd8{padding:15px}.bot.svelte-a99nd8.svelte-a99nd8{" \
|
16 |
+
"padding-left:15px}textarea{background-color:#fff}#component-48,#component-51{" \
|
17 |
"position:absolute;left:50%;top:50%;transform:translateX(-50%) translateY(" \
|
18 |
"-50%);width:50%;height:50vh;padding:80px 20px 20px;background-color:#fff;border:1px solid " \
|
19 |
"#002366}#component-49{position:initial}#component-50,#component-62{" \
|
|
|
175 |
def generate_ai_message(history, question_counter_text, character_id):
|
176 |
if check_if_questions_left(question_counter_text):
|
177 |
init_sys_message = initText[character_id] + "Stay in character. Use natural language. Don't reveal all of" \
|
178 |
+
"the information in a single message, and leave hints. Never " \
|
179 |
"reveal everything in a single message."
|
180 |
message_history = [
|
181 |
{"role": "system", "content": init_sys_message}
|
style.css
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
@import url('https://fonts.googleapis.com/css2?family=Silkscreen&display=swap');
|
2 |
|
3 |
.gradio-container {
|
4 |
background-color: #cda678;
|
@@ -32,10 +32,19 @@
|
|
32 |
background-color: #002366;
|
33 |
}
|
34 |
|
35 |
-
#component-10, #component-11,
|
|
|
36 |
background-color: #aaa;
|
37 |
}
|
38 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
textarea {
|
40 |
background-color: #fff;
|
41 |
}
|
|
|
1 |
+
@import url('https://fonts.googleapis.com/css2?family=Silkscreen:wght@400;700&display=swap');
|
2 |
|
3 |
.gradio-container {
|
4 |
background-color: #cda678;
|
|
|
32 |
background-color: #002366;
|
33 |
}
|
34 |
|
35 |
+
#component-10, #component-11, #component-18, #component-19, #component-26, #component-27, #component-34, #component-35,
|
36 |
+
#component-42, #component-43, .wrap.svelte-a99nd8 {
|
37 |
background-color: #aaa;
|
38 |
}
|
39 |
|
40 |
+
.message.svelte-a99nd8.svelte-a99nd8 {
|
41 |
+
padding: 15px;
|
42 |
+
}
|
43 |
+
|
44 |
+
.bot.svelte-a99nd8.svelte-a99nd8 {
|
45 |
+
padding-left: 15px;
|
46 |
+
}
|
47 |
+
|
48 |
textarea {
|
49 |
background-color: #fff;
|
50 |
}
|