barunsaha commited on
Commit
1175b5c
·
1 Parent(s): 5621ff1

Add stub for slides creation

Browse files
Files changed (4) hide show
  1. .gitignore +5 -0
  2. app.py +15 -3
  3. global_config.py +2 -0
  4. requirements.txt +7 -0
.gitignore CHANGED
@@ -1,3 +1,8 @@
 
 
 
 
 
1
  ### Python template
2
  # Byte-compiled / optimized / DLL files
3
  __pycache__/
 
1
+ client_secret.json
2
+ credentials.json
3
+ token.json
4
+
5
+
6
  ### Python template
7
  # Byte-compiled / optimized / DLL files
8
  __pycache__/
app.py CHANGED
@@ -1,5 +1,4 @@
1
  import json
2
-
3
  import streamlit as st
4
 
5
  import llm_helper
@@ -9,7 +8,7 @@ from global_config import GlobalConfig
9
  UI_BUTTONS = [
10
  'Generate slides content',
11
  'Generate JSON',
12
- 'Make the slides'
13
  ]
14
 
15
 
@@ -140,10 +139,23 @@ def process_slides_contents(text: str, progress_bar: st.progress):
140
 
141
  progress_bar.progress(100, text='Done!')
142
 
 
 
 
 
 
 
 
 
 
 
 
 
 
143
 
144
  def button_clicked(button):
145
  """
146
- Function to update the value in session state.
147
  """
148
 
149
  st.session_state.clicked[button] = True
 
1
  import json
 
2
  import streamlit as st
3
 
4
  import llm_helper
 
8
  UI_BUTTONS = [
9
  'Generate slides content',
10
  'Generate JSON',
11
+ 'Make the slides (requires Google sign in)'
12
  ]
13
 
14
 
 
139
 
140
  progress_bar.progress(100, text='Done!')
141
 
142
+ # Now, step 3
143
+ st.divider()
144
+ st.header('Step 3: Create Google Slides')
145
+ st.caption('Let\'s now create the slides for you')
146
+
147
+ st.write(':red[Coming soon!]')
148
+
149
+ # st.button(UI_BUTTONS[2], on_click=button_clicked, args=[2])
150
+ #
151
+ # if st.session_state.clicked[2]:
152
+ # progress_text = 'Creating...give it a moment'
153
+ # progress_bar = st.progress(0, text=progress_text)
154
+
155
 
156
  def button_clicked(button):
157
  """
158
+ Update the button clicked value in session state.
159
  """
160
 
161
  st.session_state.clicked[button] = True
global_config.py CHANGED
@@ -25,3 +25,5 @@ class GlobalConfig:
25
 
26
  PRELOAD_DATA_FILE = 'examples/example_02.json'
27
  SLIDES_TEMPLATE_FILE = 'langchain_templates/template_07.txt'
 
 
 
25
 
26
  PRELOAD_DATA_FILE = 'examples/example_02.json'
27
  SLIDES_TEMPLATE_FILE = 'langchain_templates/template_07.txt'
28
+
29
+ GOOGLE_SLIDES_CREDENTIALS: str = os.getenv('GOOGLE_SLIDES_CREDENTIALS')
requirements.txt CHANGED
@@ -2,3 +2,10 @@ python-dotenv[cli]~=1.0.0
2
  langchain~=0.0.268
3
  huggingface_hub
4
  streamlit~=1.25.0
 
 
 
 
 
 
 
 
2
  langchain~=0.0.268
3
  huggingface_hub
4
  streamlit~=1.25.0
5
+
6
+
7
+ # google-api-python-client
8
+ # google-auth-httplib2
9
+ # google-auth-oauthlib
10
+
11
+ google-api-support