Spaces:
Running
Running
crcdng
commited on
Commit
·
be764bf
1
Parent(s):
877edc4
scrolling text
Browse files- Gradio_UI.py +4 -4
- scrolling_text.css +39 -0
Gradio_UI.py
CHANGED
@@ -287,7 +287,7 @@ class GradioUI:
|
|
287 |
def launch(self, **kwargs):
|
288 |
import gradio as gr
|
289 |
|
290 |
-
with gr.Blocks(fill_height=True, theme='crcdng/cyber', css_paths="cyberpunk.css") as demo:
|
291 |
|
292 |
title_html=(
|
293 |
"""
|
@@ -315,8 +315,8 @@ class GradioUI:
|
|
315 |
|
316 |
banner_html=(
|
317 |
"""
|
318 |
-
<div class="cyber-banner-short bg-purple fg-white cyber-glitch-1">
|
319 |
-
Tannhäuser Gate Approved
|
320 |
</div>
|
321 |
"""
|
322 |
)
|
@@ -370,7 +370,7 @@ class GradioUI:
|
|
370 |
[stored_messages, text_input],
|
371 |
).then(self.interact_with_agent, [stored_messages, chatbot], [chatbot])
|
372 |
examples = gr.Examples(
|
373 |
-
examples=[["Tell me a joke based on the current local time"],["Given the current local time, what is a fun activity to do?"],["When asked for the current local time, add 6 hours to it. What is the current local time?"], ["Find significant events that happend exactly one year ago"], ["Generate a bold picture inspired by the current local time"]],
|
374 |
inputs=[text_input],
|
375 |
)
|
376 |
|
|
|
287 |
def launch(self, **kwargs):
|
288 |
import gradio as gr
|
289 |
|
290 |
+
with gr.Blocks(fill_height=True, theme='crcdng/cyber', css_paths="cyberpunk.css, scrolling_text.css") as demo:
|
291 |
|
292 |
title_html=(
|
293 |
"""
|
|
|
315 |
|
316 |
banner_html=(
|
317 |
"""
|
318 |
+
<div class="cyber-banner-short bg-purple fg-white cyber-glitch-1 scroll-container">
|
319 |
+
<div class="scroll-text">Tannhäuser Gate Approved<div>
|
320 |
</div>
|
321 |
"""
|
322 |
)
|
|
|
370 |
[stored_messages, text_input],
|
371 |
).then(self.interact_with_agent, [stored_messages, chatbot], [chatbot])
|
372 |
examples = gr.Examples(
|
373 |
+
examples=[["Tell me a joke based on the current local time"],["Given the current local time, what is a fun activity to do?"],["When asked for the current local time, add 6 hours to it. What is the current local time?"], ["Find significant events that happend exactly one year ago"], ["Compute the current local time glitch coeficients"],["Generate a bold picture inspired by the current local time"]],
|
374 |
inputs=[text_input],
|
375 |
)
|
376 |
|
scrolling_text.css
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#scroll-container {
|
2 |
+
overflow: hidden;
|
3 |
+
}
|
4 |
+
|
5 |
+
#scroll-text {
|
6 |
+
/* animation properties */
|
7 |
+
-moz-transform: translateX(100%);
|
8 |
+
-webkit-transform: translateX(100%);
|
9 |
+
transform: translateX(100%);
|
10 |
+
|
11 |
+
-moz-animation: my-animation 15s linear infinite;
|
12 |
+
-webkit-animation: my-animation 15s linear infinite;
|
13 |
+
animation: my-animation 15s linear infinite;
|
14 |
+
}
|
15 |
+
|
16 |
+
/* for Firefox */
|
17 |
+
@-moz-keyframes my-animation {
|
18 |
+
from { -moz-transform: translateX(100%); }
|
19 |
+
to { -moz-transform: translateX(-100%); }
|
20 |
+
}
|
21 |
+
|
22 |
+
/* for Chrome */
|
23 |
+
@-webkit-keyframes my-animation {
|
24 |
+
from { -webkit-transform: translateX(100%); }
|
25 |
+
to { -webkit-transform: translateX(-100%); }
|
26 |
+
}
|
27 |
+
|
28 |
+
@keyframes my-animation {
|
29 |
+
from {
|
30 |
+
-moz-transform: translateX(100%);
|
31 |
+
-webkit-transform: translateX(100%);
|
32 |
+
transform: translateX(100%);
|
33 |
+
}
|
34 |
+
to {
|
35 |
+
-moz-transform: translateX(-100%);
|
36 |
+
-webkit-transform: translateX(-100%);
|
37 |
+
transform: translateX(-100%);
|
38 |
+
}
|
39 |
+
}
|