Spaces:
Sleeping
Sleeping
ElouarnLC
commited on
Commit
·
89a1906
1
Parent(s):
4a2256a
Change hidden context to static
Browse files
app.py
CHANGED
|
@@ -23,7 +23,7 @@ global_context = {
|
|
| 23 |
|
| 24 |
# Créer une interface avec un champ de texte pour le contexte caché
|
| 25 |
context_input = gr.Textbox(
|
| 26 |
-
label="Contexte caché", value=global_context["
|
| 27 |
)
|
| 28 |
|
| 29 |
|
|
@@ -111,7 +111,7 @@ def reset_history(chatbot):
|
|
| 111 |
|
| 112 |
def update_context(context):
|
| 113 |
global global_context
|
| 114 |
-
global_context["
|
| 115 |
global mychatbot
|
| 116 |
mychatbot.history = reset_history(mychatbot)
|
| 117 |
global global_iteration
|
|
|
|
| 23 |
|
| 24 |
# Créer une interface avec un champ de texte pour le contexte caché
|
| 25 |
context_input = gr.Textbox(
|
| 26 |
+
label="Contexte caché", value=global_context["static_context"]
|
| 27 |
)
|
| 28 |
|
| 29 |
|
|
|
|
| 111 |
|
| 112 |
def update_context(context):
|
| 113 |
global global_context
|
| 114 |
+
global_context["static_context"] = context
|
| 115 |
global mychatbot
|
| 116 |
mychatbot.history = reset_history(mychatbot)
|
| 117 |
global global_iteration
|