Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -82,7 +82,10 @@ def set_theme(theme):
|
|
82 |
historias.pop(0)
|
83 |
p=m.choices[0].message.content
|
84 |
historias.append({"role":"assistant","content":p})
|
85 |
-
|
|
|
|
|
|
|
86 |
|
87 |
cc=gr.Chatbot(value=llamatochat(historias), visible=False)
|
88 |
resp=[gr.Textbox(visible=False),gr.Button(visible=False),gr.Textbox(visible=True,value=l.get("msg")),cc]
|
|
|
82 |
historias.pop(0)
|
83 |
p=m.choices[0].message.content
|
84 |
historias.append({"role":"assistant","content":p})
|
85 |
+
try:
|
86 |
+
l=loads(p)
|
87 |
+
except Exception as e:
|
88 |
+
print(p,"<-")
|
89 |
|
90 |
cc=gr.Chatbot(value=llamatochat(historias), visible=False)
|
91 |
resp=[gr.Textbox(visible=False),gr.Button(visible=False),gr.Textbox(visible=True,value=l.get("msg")),cc]
|