prakharg24 commited on
Commit
d7fe81c
·
verified ·
1 Parent(s): 9d4fd04

Update my_pages/pre_information_loss.py

Browse files
Files changed (1) hide show
  1. my_pages/pre_information_loss.py +7 -47
my_pages/pre_information_loss.py CHANGED
@@ -1,56 +1,16 @@
1
  import streamlit as st
2
- import time
3
- from utils import add_bottom_navigation
4
-
5
- # def render():
6
- # st.markdown(
7
- # """
8
- # <div style='text-align: left; font-size:24px; color:#A6C8FF;'>
9
- # Welcome to the Multiplicity Interactive Demo.<br><br>
10
- # In this demo, you will explore how developer choices create a multiverse of possible models,
11
- # and how these choices connect to concerns of arbitrariness and homogenization in AI.<br><br>
12
- # The takeaway for the demo will be presented when you click 'Get Started'.
13
- # You may then navigate the demo by interacting with various concepts in the takeaway paragraph and returning as you wish,
14
- # or follow the guided tutorial which will go through all pieces in order.<br><br>
15
- # </div>
16
- # """,
17
- # unsafe_allow_html=True
18
- # )
19
 
20
  def render():
21
  paragraphs = [
22
- "Welcome to the Multiplicity Interactive Demo.",
23
- "In this demo, you will explore how developer choices create a multiverse of possible models, "
24
- "and how these choices connect to concerns of arbitrariness and homogenization in AI.",
25
- "The takeaway for the demo will be presented when you click 'Get Started'. "
26
  "You may then navigate the demo by interacting with various concepts in the takeaway paragraph "
27
- "and returning as you wish, or follow the guided tutorial which will go through all pieces in order."
28
  ]
29
 
30
- # Define CSS fade-in animation
31
- st.markdown("""
32
- <style>
33
- @keyframes fadeIn {
34
- from {opacity: 0;}
35
- to {opacity: 1;}
36
- }
37
- .fade-in {
38
- animation: fadeIn 1.5s ease-in forwards;
39
- opacity: 0;
40
- margin-bottom: 1em;
41
- font-size: 24px;
42
- color: #A6C8FF;
43
- text-align: left;
44
- }
45
- </style>
46
- """, unsafe_allow_html=True)
47
-
48
- # Create one placeholder for each paragraph
49
- placeholders = [st.empty() for _ in paragraphs]
50
-
51
- # Reveal paragraphs sequentially
52
- for i, p in enumerate(paragraphs):
53
- placeholders[i].markdown(f"<div class='fade-in'>{p}</div>", unsafe_allow_html=True)
54
- time.sleep(2) # delay (seconds) before showing next one
55
 
56
  add_bottom_navigation("landing", "information_loss")
 
1
  import streamlit as st
2
+ from utils import add_bottom_navigation, add_fadein_text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
 
4
  def render():
5
  paragraphs = [
6
+ ("Welcome to the Multiplicity Interactive Demo.", 2),
7
+ ("In this demo, you will explore how developer choices create a multiverse of possible models, "
8
+ "and how these choices connect to concerns of arbitrariness and homogenization in AI.", 2),
9
+ ("The takeaway for the demo will be presented when you click 'Get Started'. "
10
  "You may then navigate the demo by interacting with various concepts in the takeaway paragraph "
11
+ "and returning as you wish, or follow the guided tutorial which will go through all pieces in order.", 2)
12
  ]
13
 
14
+ add_fadein_text(paragraphs)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
 
16
  add_bottom_navigation("landing", "information_loss")