barunsaha commited on
Commit
4d7e0d8
1 Parent(s): 7810024

Add feedback link and refactor some code

Browse files
Files changed (2) hide show
  1. app.py +13 -21
  2. global_config.py +0 -4
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
@@ -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
 
 
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