Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -54,8 +54,7 @@ with gr.Blocks(theme=gr.themes.Monochrome(),css="footer{display:none !important}
|
|
| 54 |
|
| 55 |
user_dictionary[user_id].append({"role": "assistant", "content": reply_prompt}) # Adds the chatbots response to the history as an "assistant". This is the role commonly used for chatbots.
|
| 56 |
|
| 57 |
-
response = [(user_dictionary[user_id][i]["content"], user_dictionary[user_id][i+1]["content"]) for i in range(
|
| 58 |
-
# response = [(user_dictionary[user_id][i]["content"], user_dictionary[user_id][i+1]["content"]) for i in range(1, len(user_dictionary[user_id])-1, 2)] # Variable for the response
|
| 59 |
|
| 60 |
# Repository details
|
| 61 |
repo = g.get_user().get_repo("CATDATA")
|
|
@@ -88,6 +87,7 @@ with gr.Blocks(theme=gr.themes.Monochrome(),css="footer{display:none !important}
|
|
| 88 |
placeholder = initial_message,
|
| 89 |
container=False
|
| 90 |
)
|
|
|
|
| 91 |
|
| 92 |
# Adding the messages into the row with gradio.
|
| 93 |
txt.submit(predict_prompt, [txt, user_id], Chatbot)
|
|
|
|
| 54 |
|
| 55 |
user_dictionary[user_id].append({"role": "assistant", "content": reply_prompt}) # Adds the chatbots response to the history as an "assistant". This is the role commonly used for chatbots.
|
| 56 |
|
| 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])-1, 2)] # Variable for the response
|
|
|
|
| 58 |
|
| 59 |
# Repository details
|
| 60 |
repo = g.get_user().get_repo("CATDATA")
|
|
|
|
| 87 |
placeholder = initial_message,
|
| 88 |
container=False
|
| 89 |
)
|
| 90 |
+
state = gr.State()
|
| 91 |
|
| 92 |
# Adding the messages into the row with gradio.
|
| 93 |
txt.submit(predict_prompt, [txt, user_id], Chatbot)
|