2
2
import Data .caption_languages as data
3
3
import Modules .file_io as file_io
4
4
5
- st .set_page_config (page_title = "SumGPT" , page_icon = "📝" , layout = "wide" )
5
+ def setup ():
6
+ st .set_page_config (page_title = "SumGPT" , page_icon = "📝" , layout = "wide" )
6
7
7
- if not st .session_state .get ('OPENAI_API_KEY' ):
8
- st .session_state ['OPENAI_API_KEY' ] = None
8
+ if not st .session_state .get ('OPENAI_API_KEY' ):
9
+ st .session_state ['OPENAI_API_KEY' ] = None
9
10
10
- if not st .session_state .get ('OPENAI_PERSONA_REC' ):
11
- st .session_state ['OPENAI_PERSONA_REC' ] = None
11
+ if not st .session_state .get ('OPENAI_PERSONA_REC' ):
12
+ st .session_state ['OPENAI_PERSONA_REC' ] = None
12
13
13
- if not st .session_state .get ('OPENAI_PERSONA_SUM' ):
14
- st .session_state ['OPENAI_PERSONA_SUM' ] = None
14
+ if not st .session_state .get ('OPENAI_PERSONA_SUM' ):
15
+ st .session_state ['OPENAI_PERSONA_SUM' ] = None
15
16
16
- if not st .session_state .get ('CHUNK_SIZE' ):
17
- st .session_state ['CHUNK_SIZE' ] = None
17
+ if not st .session_state .get ('CHUNK_SIZE' ):
18
+ st .session_state ['CHUNK_SIZE' ] = None
18
19
19
- if not st .session_state .get ('OPENAI_PARAMS' ):
20
- st .session_state ['OPENAI_PARAMS' ] = None
20
+ if not st .session_state .get ('OPENAI_PARAMS' ):
21
+ st .session_state ['OPENAI_PARAMS' ] = None
21
22
22
- if not st .session_state .get ('DELAY' ):
23
- st .session_state ['DELAY' ] = 0
23
+ if not st .session_state .get ('DELAY' ):
24
+ st .session_state ['DELAY' ] = 0
24
25
25
- if not st .session_state .get ('FINAL_SUMMARY_MODE' ):
26
- st .session_state ['FINAL_SUMMARY_MODE' ] = False
26
+ if not st .session_state .get ('FINAL_SUMMARY_MODE' ):
27
+ st .session_state ['FINAL_SUMMARY_MODE' ] = False
27
28
28
- if not st .session_state .get ('CAPTION_LANGUAGES' ):
29
- st .session_state ['CAPTION_LANGUAGES' ] = data .languages + data .auto_languages
29
+ if not st .session_state .get ('CAPTION_LANGUAGES' ):
30
+ st .session_state ['CAPTION_LANGUAGES' ] = data .languages + data .auto_languages
30
31
31
- if not st .session_state .get ('PREVIOUS_RESULTS' ):
32
- st .session_state ['PREVIOUS_RESULTS' ] = None
32
+ if not st .session_state .get ('PREVIOUS_RESULTS' ):
33
+ st .session_state ['PREVIOUS_RESULTS' ] = None
33
34
34
- if not st .session_state .get ('MANIFEST' ):
35
- st .session_state ["MANIFEST" ] = file_io .read_json ("src/manifest.json" )
35
+ if not st .session_state .get ('MANIFEST' ):
36
+ st .session_state ["MANIFEST" ] = file_io .read_json ("src/manifest.json" )
0 commit comments