Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -33,7 +33,7 @@ with gr.Blocks(theme=gr.themes.Monochrome(),css="footer{display:none !important}
|
|
| 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.
|
| 34 |
|
| 35 |
# Creating a new file with the new id to save the user responses and the chat bot responses to the repository
|
| 36 |
-
repo = g.get_user().get_repo("
|
| 37 |
file_type = '.txt'
|
| 38 |
filename = str(new_id) + file_type
|
| 39 |
repo.create_file(filename, "Saving" + filename, "")
|
|
@@ -57,7 +57,7 @@ with gr.Blocks(theme=gr.themes.Monochrome(),css="footer{display:none !important}
|
|
| 57 |
response = [(user_dictionary[user_id][i]["content"], user_dictionary[user_id][i+1]["content"]) for i in range(1, len(user_dictionary[user_id]), 2)] # Variable for the response
|
| 58 |
|
| 59 |
# Repository details
|
| 60 |
-
repo = g.get_user().get_repo("
|
| 61 |
commit_message = "Updating file content"
|
| 62 |
|
| 63 |
# This chunk of code basically loops through the message history so we can update the save file with all the correct history in one piece of content.
|
|
|
|
| 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.
|
| 34 |
|
| 35 |
# Creating a new file with the new id to save the user responses and the chat bot responses to the repository
|
| 36 |
+
repo = g.get_user().get_repo("CATDATA3")
|
| 37 |
file_type = '.txt'
|
| 38 |
filename = str(new_id) + file_type
|
| 39 |
repo.create_file(filename, "Saving" + filename, "")
|
|
|
|
| 57 |
response = [(user_dictionary[user_id][i]["content"], user_dictionary[user_id][i+1]["content"]) for i in range(1, len(user_dictionary[user_id]), 2)] # Variable for the response
|
| 58 |
|
| 59 |
# Repository details
|
| 60 |
+
repo = g.get_user().get_repo("CATDATA3")
|
| 61 |
commit_message = "Updating file content"
|
| 62 |
|
| 63 |
# This chunk of code basically loops through the message history so we can update the save file with all the correct history in one piece of content.
|