Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
#Divergence
|
| 2 |
# Importing gradio for User Interface, importing openai api for the chatbot, importing os for retrieving the secrets from the environment to save as variables, importing uuid for creating a user id.
|
| 3 |
import gradio as gr
|
| 4 |
import openai
|
|
@@ -27,7 +27,7 @@ with gr.Blocks(theme=gr.themes.Monochrome(),css="footer{display:none !important}
|
|
| 27 |
message_history = [] # Empty list for message history.
|
| 28 |
user_dictionary.update({new_id:message_history}) # Add the new id and empty history into the dictionary.
|
| 29 |
|
| 30 |
-
instructions = '
|
| 31 |
# Change the message under the apostrophes to change the instructions you want the bot to inhibit.
|
| 32 |
|
| 33 |
user_dictionary[new_id].append({"role": "developer", "content": instructions}) # This line adds the instructions to the message history (as a developer) so it will always inhibit the instructions no matter what the user says.
|
|
|
|
| 1 |
+
#Divergence-AI
|
| 2 |
# Importing gradio for User Interface, importing openai api for the chatbot, importing os for retrieving the secrets from the environment to save as variables, importing uuid for creating a user id.
|
| 3 |
import gradio as gr
|
| 4 |
import openai
|
|
|
|
| 27 |
message_history = [] # Empty list for message history.
|
| 28 |
user_dictionary.update({new_id:message_history}) # Add the new id and empty history into the dictionary.
|
| 29 |
|
| 30 |
+
instructions = ''
|
| 31 |
# Change the message under the apostrophes to change the instructions you want the bot to inhibit.
|
| 32 |
|
| 33 |
user_dictionary[new_id].append({"role": "developer", "content": instructions}) # This line adds the instructions to the message history (as a developer) so it will always inhibit the instructions no matter what the user says.
|