simonraj commited on
Commit
f7f1be2
1 Parent(s): 384aa04

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -14
app.py CHANGED
@@ -105,11 +105,10 @@ def set_visible_false():
105
  def set_visible_true():
106
  return gr.update(visible=True)
107
 
108
- title = """<h1 align="center">🔥English Teaching Assistant for Primary 6 Students +🚀Gradio-Streaming</h1>"""
109
 
110
  #Using info to add additional information about System message in GPT4
111
- system_msg_info = """The system message is used to set the context and behavior of the AI assistant at the beginning of a conversation. It provides instructions to the assistant to help guide its responses. For example, if you want the assistant to act as an expert in history, you can use the system message 'You are an expert in history.'"""
112
-
113
 
114
  #Modifying existing Gradio Theme
115
  theme = gr.themes.Soft(primary_hue="indigo", secondary_hue="blue", neutral_hue="blue",
@@ -118,7 +117,8 @@ theme = gr.themes.Soft(primary_hue="indigo", secondary_hue="blue", neutral_hue="
118
  with gr.Blocks(css = """#col_container { margin-left: auto; margin-right: auto;} #chatbot {height: 520px; overflow: auto;}""",
119
  theme=theme) as demo:
120
  gr.HTML(title)
121
- gr.HTML("""<h3 align="center">🔥This application provides AI assistance for various English teaching roles in a Singapore Primary School 🎉🥳🎉🙌</h1>""")
 
122
 
123
  with gr.Column(elem_id = "col_container"):
124
  #GPT4 API Key is provided by Huggingface
@@ -155,15 +155,7 @@ with gr.Blocks(css = """#col_container { margin-left: auto; margin-right: auto;}
155
  # Fix the indentation here
156
  with gr.Accordion(label="Examples for System message:", open=False):
157
  gr.Examples(
158
- examples=[["You are an English Oral Coach for Primary 6 students. Help students improve their English speaking skills by providing helpful tips, correcting grammar, and giving advice on pronunciation."],
159
- ["You are a Creative Writing Coach for Primary 6 students. Help students enhance their creative writing skills by providing tips on story ideas, improving vocabulary, and suggesting ways to make their stories more engaging."],
160
- ["You are a Reading Comprehension Expert for Primary 6 students. Assist students in understanding reading passages and answering comprehension questions by offering strategies for finding the main idea, making inferences, and identifying key details."],
161
- ["You are a Grammar Guru for Primary 6 students. Provide guidance to students on proper grammar usage, punctuation, and sentence structure to improve their written and spoken English."],
162
- ["You are an English Vocabulary Builder for Primary 6 students. Help students expand their vocabulary by teaching them new words, explaining word meanings, and giving examples of how to use the words in context."],
163
- ["You are a Listening Skills Mentor for Primary 6 students. Help students improve their listening skills by providing tips on active listening, understanding different accents, and comprehending spoken English in various contexts."],
164
- ["You are a Pronunciation Expert for Primary 6 students. Assist students in refining their English pronunciation by focusing on intonation, stress, and the correct pronunciation of challenging sounds and words."],
165
- ],
166
  inputs=system_msg,)
167
 
168
-
169
- demo.queue(max_size=99, concurrency_count=20).launch(debug=True)
 
105
  def set_visible_true():
106
  return gr.update(visible=True)
107
 
108
+ title = """<h1 align="center">🔥Social Studies Assistant for Primary 6 Students +🚀Gradio-Streaming</h1>"""
109
 
110
  #Using info to add additional information about System message in GPT4
111
+ system_msg_info = """The system message is used to set the context and behavior of the AI assistant at the beginning of a conversation."""
 
112
 
113
  #Modifying existing Gradio Theme
114
  theme = gr.themes.Soft(primary_hue="indigo", secondary_hue="blue", neutral_hue="blue",
 
117
  with gr.Blocks(css = """#col_container { margin-left: auto; margin-right: auto;} #chatbot {height: 520px; overflow: auto;}""",
118
  theme=theme) as demo:
119
  gr.HTML(title)
120
+ gr.HTML("""<h3 align="center">🔥This application provides AI assistance for Primary 6 Social Studies students in Singapore focusing on South East Asian Kingdoms 🎉🥳🎉🙌</h1>""")
121
+
122
 
123
  with gr.Column(elem_id = "col_container"):
124
  #GPT4 API Key is provided by Huggingface
 
155
  # Fix the indentation here
156
  with gr.Accordion(label="Examples for System message:", open=False):
157
  gr.Examples(
158
+ examples=[["You are a Social Studies Coach for Primary 6 students in Singapore. Use Socratic questioning to help students discover the legacies of South East Asian Kingdoms such as Funan, Srivijaya, Sukhothai, Majapahit, Melaka, and Angkor. If a student asks about a topic outside of these, kindly redirect them to focus on the specified kingdoms."]],
 
 
 
 
 
 
 
159
  inputs=system_msg,)
160
 
161
+ demo.queue(max_size=99, concurrency_count=40).launch(debug=True)