Spaces:
Running
Running
Commit
•
142cf51
1
Parent(s):
6c57304
Update app.py
Browse filesremove gradio state comment
app.py
CHANGED
@@ -94,11 +94,10 @@ def get_chat_response(name,history=[], input_txt = "Hello , what is your name?")
|
|
94 |
|
95 |
def greet(character,message,history):
|
96 |
|
97 |
-
#gradios set_state/get_state had problems on embedded html!
|
98 |
history = history or {"character": character, "message_history" : [] }
|
99 |
-
|
100 |
-
#
|
101 |
-
|
102 |
if history["character"] != character:
|
103 |
#switching character
|
104 |
history = {"character": character, "message_history" : [] }
|
|
|
94 |
|
95 |
def greet(character,message,history):
|
96 |
|
|
|
97 |
history = history or {"character": character, "message_history" : [] }
|
98 |
+
|
99 |
+
# Gradio 3 has states working in browser now.
|
100 |
+
|
101 |
if history["character"] != character:
|
102 |
#switching character
|
103 |
history = {"character": character, "message_history" : [] }
|