JMalott commited on
Commit
130cb9f
1 Parent(s): d9a9ea3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -13
app.py CHANGED
@@ -1,11 +1,9 @@
1
  import streamlit as st
2
  import pandas as pd
3
  import numpy as np
4
-
5
  import os, random, time
6
-
7
  from utils import footer
8
- from page import generate, reduce
9
 
10
 
11
  st.set_page_config(
@@ -13,11 +11,14 @@ st.set_page_config(
13
  )
14
 
15
  if( hasattr(st.session_state, 'page') == False):
16
- st.session_state.page = 0
17
 
18
  if( hasattr(st.session_state, 'results') == False):
19
  st.session_state.results = []
20
 
 
 
 
21
  p1 = st.empty()
22
  p2 = st.empty()
23
  p3 = st.empty()
@@ -25,31 +26,32 @@ p3 = st.empty()
25
 
26
  st.session_state.stop = False
27
  st.session_state.progress = 0
 
28
  st.session_state.images = []
29
  st.session_state.regenerate = False
30
 
 
 
31
  footer()
32
 
 
 
 
 
 
 
33
  if(st.session_state.page == 0):
34
  p2.empty()
35
  p3.empty()
36
  with p1.container():
37
  generate.app()
38
 
39
-
40
  if(st.session_state.page == 1):
41
  p1.empty()
42
  p3.empty()
43
  with p2.container():
44
  reduce.app()
45
 
46
- if(st.session_state.page == 2):
47
- p1.empty()
48
- p2.empty()
49
- with p3.container():
50
- st.write("This 333")
51
- startButton = st.button("S3")
52
- if startButton:
53
- st.session_state.page = 0
54
 
55
 
 
1
  import streamlit as st
2
  import pandas as pd
3
  import numpy as np
 
4
  import os, random, time
 
5
  from utils import footer
6
+ from page import generate, reduce, intro
7
 
8
 
9
  st.set_page_config(
 
11
  )
12
 
13
  if( hasattr(st.session_state, 'page') == False):
14
+ st.session_state.page = 2
15
 
16
  if( hasattr(st.session_state, 'results') == False):
17
  st.session_state.results = []
18
 
19
+ if( hasattr(st.session_state, 'prompt') == False):
20
+ st.session_state.prompt = None
21
+
22
  p1 = st.empty()
23
  p2 = st.empty()
24
  p3 = st.empty()
 
26
 
27
  st.session_state.stop = False
28
  st.session_state.progress = 0
29
+ #st.session_state.prompt = None
30
  st.session_state.images = []
31
  st.session_state.regenerate = False
32
 
33
+
34
+
35
  footer()
36
 
37
+ if(st.session_state.page == 2):
38
+ p1.empty()
39
+ p2.empty()
40
+ with p3.container():
41
+ intro.app()
42
+
43
  if(st.session_state.page == 0):
44
  p2.empty()
45
  p3.empty()
46
  with p1.container():
47
  generate.app()
48
 
 
49
  if(st.session_state.page == 1):
50
  p1.empty()
51
  p3.empty()
52
  with p2.container():
53
  reduce.app()
54
 
55
+
 
 
 
 
 
 
 
56
 
57