barunsaha commited on
Commit
45d4589
2 Parent(s): 7810024 8fcdd22

Merge pull request #39 from barun-saha/visual

Browse files
Files changed (2) hide show
  1. app.py +13 -21
  2. global_config.py +4 -8
app.py CHANGED
@@ -96,9 +96,9 @@ pptx_template = st.sidebar.radio(
96
  )
97
 
98
 
99
- def display_page_header_content():
100
  """
101
- Display content in the page header.
102
  """
103
 
104
  st.title(APP_TEXT['app_name'])
@@ -107,24 +107,8 @@ def display_page_header_content():
107
  '![Visitors](https://api.visitorbadge.io/api/visitors?path=https%3A%2F%2Fhuggingface.co%2Fspaces%2Fbarunsaha%2Fslide-deck-ai&countColor=%23263759)' # noqa: E501
108
  )
109
 
110
-
111
- def display_page_footer_content():
112
- """
113
- Display content in the page footer.
114
- """
115
-
116
- st.text(APP_TEXT['tos'] + '\n\n' + APP_TEXT['tos2'])
117
-
118
-
119
- def build_ui():
120
- """
121
- Display the input elements for content generation.
122
- """
123
-
124
- display_page_header_content()
125
-
126
  with st.expander('Usage Policies and Limitations'):
127
- display_page_footer_content()
128
 
129
  set_up_chat_ui()
130
 
@@ -137,10 +121,18 @@ def set_up_chat_ui():
137
  with st.expander('Usage Instructions'):
138
  st.markdown(GlobalConfig.CHAT_USAGE_INSTRUCTIONS)
139
  st.markdown(
140
- 'SlideDeck AI is powered by' # noqa: E501
141
- ' [Mistral-Nemo-Instruct-2407](https://huggingface.co/mistralai/Mistral-Nemo-Instruct-2407).'
 
142
  )
143
 
 
 
 
 
 
 
 
144
  # view_messages = st.expander('View the messages in the session state')
145
 
146
  st.chat_message('ai').write(
 
96
  )
97
 
98
 
99
+ def build_ui():
100
  """
101
+ Display the input elements for content generation.
102
  """
103
 
104
  st.title(APP_TEXT['app_name'])
 
107
  '![Visitors](https://api.visitorbadge.io/api/visitors?path=https%3A%2F%2Fhuggingface.co%2Fspaces%2Fbarunsaha%2Fslide-deck-ai&countColor=%23263759)' # noqa: E501
108
  )
109
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
110
  with st.expander('Usage Policies and Limitations'):
111
+ st.text(APP_TEXT['tos'] + '\n\n' + APP_TEXT['tos2'])
112
 
113
  set_up_chat_ui()
114
 
 
121
  with st.expander('Usage Instructions'):
122
  st.markdown(GlobalConfig.CHAT_USAGE_INSTRUCTIONS)
123
  st.markdown(
124
+ '[SlideDeck AI](https://github.com/barun-saha/slide-deck-ai) is an Open-Source project.' # noqa: E501
125
+ ' It is is powered by' # noqa: E501
126
+ ' [Mistral-Nemo-Instruct-2407](https://huggingface.co/mistralai/Mistral-Nemo-Instruct-2407).' # noqa: E501
127
  )
128
 
129
+ st.info(
130
+ 'If you like SlideDeck AI, please consider leaving a heart ❤️ on the'
131
+ ' [Hugging Face Space](https://huggingface.co/spaces/barunsaha/slide-deck-ai/) or'
132
+ ' a star ⭐ on [GitHub](https://github.com/barun-saha/slide-deck-ai).'
133
+ ' Your [feedback](https://forms.gle/JECFBGhjvSj7moBx9) is appreciated.'
134
+ )
135
+
136
  # view_messages = st.expander('View the messages in the session state')
137
 
138
  st.chat_message('ai').write(
global_config.py CHANGED
@@ -42,19 +42,19 @@ class GlobalConfig:
42
  PPTX_TEMPLATE_FILES = {
43
  'Basic': {
44
  'file': 'pptx_templates/Blank.pptx',
45
- 'caption': '🟠 A good start (Uses [photos](https://unsplash.com/photos/AFZ-qBPEceA) by [cetteup](https://unsplash.com/@cetteup?utm_content=creditCopyText&utm_medium=referral&utm_source=unsplash) on [Unsplash](https://unsplash.com/photos/a-foggy-forest-filled-with-lots-of-trees-d3ci37Gcgxg?utm_content=creditCopyText&utm_medium=referral&utm_source=unsplash))'
46
  },
47
  'Minimalist Sales Pitch': {
48
  'file': 'pptx_templates/Minimalist_sales_pitch.pptx',
49
- 'caption': 'In high contrast'
50
  },
51
  'Ion Boardroom': {
52
  'file': 'pptx_templates/Ion_Boardroom.pptx',
53
- 'caption': '🔴 Make some bold decisions'
54
  },
55
  'Urban Monochrome': {
56
  'file': 'pptx_templates/Urban_monochrome.pptx',
57
- 'caption': 'Marvel in a monochrome dream'
58
  },
59
  }
60
 
@@ -74,10 +74,6 @@ class GlobalConfig:
74
  ' SlideDeck AI does not have access to the Web, apart for searching for images relevant'
75
  ' to the slides. Photos are added probabilistically; transparency needs to be changed'
76
  ' manually, if required.'
77
- '\n\n'
78
- 'If you like SlideDeck AI, please consider leaving a heart ❤️ on the'
79
- ' [Hugging Face Space](https://huggingface.co/spaces/barunsaha/slide-deck-ai/) or'
80
- ' a star ⭐ on [GitHub](https://github.com/barun-saha/slide-deck-ai).'
81
  )
82
 
83
 
 
42
  PPTX_TEMPLATE_FILES = {
43
  'Basic': {
44
  'file': 'pptx_templates/Blank.pptx',
45
+ 'caption': 'A good start (Uses [photos](https://unsplash.com/photos/AFZ-qBPEceA) by [cetteup](https://unsplash.com/@cetteup?utm_content=creditCopyText&utm_medium=referral&utm_source=unsplash) on [Unsplash](https://unsplash.com/photos/a-foggy-forest-filled-with-lots-of-trees-d3ci37Gcgxg?utm_content=creditCopyText&utm_medium=referral&utm_source=unsplash)) 🟧'
46
  },
47
  'Minimalist Sales Pitch': {
48
  'file': 'pptx_templates/Minimalist_sales_pitch.pptx',
49
+ 'caption': 'In high contrast'
50
  },
51
  'Ion Boardroom': {
52
  'file': 'pptx_templates/Ion_Boardroom.pptx',
53
+ 'caption': 'Make some bold decisions 🟥'
54
  },
55
  'Urban Monochrome': {
56
  'file': 'pptx_templates/Urban_monochrome.pptx',
57
+ 'caption': 'Marvel in a monochrome dream'
58
  },
59
  }
60
 
 
74
  ' SlideDeck AI does not have access to the Web, apart for searching for images relevant'
75
  ' to the slides. Photos are added probabilistically; transparency needs to be changed'
76
  ' manually, if required.'
 
 
 
 
77
  )
78
 
79