Chad commited on
Commit ·
0c148ab
1
Parent(s): 8c128f8
newline fix
Browse files
app.py
CHANGED
|
@@ -119,9 +119,9 @@ def user_guide(chat_history, language_state):
|
|
| 119 |
userGuide = ''
|
| 120 |
|
| 121 |
if language_state == "english":
|
| 122 |
-
userGuide = "I am a chatbot designed to help you study and learn history.
|
| 123 |
else:
|
| 124 |
-
userGuide = "Je suis un chatbot conçu pour vous aider à étudier et à apprendre l'histoire.
|
| 125 |
|
| 126 |
chat_history.append({"role": "assistant", "content": userGuide})
|
| 127 |
return chat_history, chat_history
|
|
@@ -139,6 +139,7 @@ with gr.Blocks() as interface:
|
|
| 139 |
|
| 140 |
title = gr.Markdown("## History Chatbot")
|
| 141 |
lang_button = gr.Button("FR")
|
|
|
|
| 142 |
chatbot = gr.Chatbot(type="messages")
|
| 143 |
user_input = gr.Textbox(placeholder="Enter your question here...")
|
| 144 |
send_button = gr.Button("Send")
|
|
@@ -153,7 +154,6 @@ with gr.Blocks() as interface:
|
|
| 153 |
quiz_num_questions = gr.Number(label="Number of Questions", value=5, precision=0)
|
| 154 |
quiz_button = gr.Button("Start Quiz")
|
| 155 |
|
| 156 |
-
help_button = gr.Button("User Guide")
|
| 157 |
|
| 158 |
state = gr.State([])
|
| 159 |
|
|
|
|
| 119 |
userGuide = ''
|
| 120 |
|
| 121 |
if language_state == "english":
|
| 122 |
+
userGuide = "I am a chatbot designed to help you study and learn history.\nEnter a question and click send to see my answer.\nIf you want to reset the chat click the button right under send.\nYou can also chose to send one of the example promts I've provided so you can see what I'm capable of!\nIf you want to test yourself on a certain topic, enter a quiz subject, chose the number of questions, and click on start quiz...\ntEnjoy:)"
|
| 123 |
else:
|
| 124 |
+
userGuide = "Je suis un chatbot conçu pour vous aider à étudier et à apprendre l'histoire.\nSaisissez une question et cliquez sur «Envoyer» pour voir ma réponse.\nSi vous souhaitez réinitialiser le chat, cliquez sur le bouton situé juste en dessous de «Envoyer».\nVous pouvez également choisir d'envoyer l'un des exemples d'invites que j'ai fournis pour que vous puissiez voir de quoi je suis capable!\nSi vous souhaitez vous tester sur un sujet spécifique, saisissez un sujet de quiz, choisissez le nombre de questions et cliquez sur «Démarrer le quiz»...\nProfitez-en:)"
|
| 125 |
|
| 126 |
chat_history.append({"role": "assistant", "content": userGuide})
|
| 127 |
return chat_history, chat_history
|
|
|
|
| 139 |
|
| 140 |
title = gr.Markdown("## History Chatbot")
|
| 141 |
lang_button = gr.Button("FR")
|
| 142 |
+
help_button = gr.Button("User Guide")
|
| 143 |
chatbot = gr.Chatbot(type="messages")
|
| 144 |
user_input = gr.Textbox(placeholder="Enter your question here...")
|
| 145 |
send_button = gr.Button("Send")
|
|
|
|
| 154 |
quiz_num_questions = gr.Number(label="Number of Questions", value=5, precision=0)
|
| 155 |
quiz_button = gr.Button("Start Quiz")
|
| 156 |
|
|
|
|
| 157 |
|
| 158 |
state = gr.State([])
|
| 159 |
|