Spaces:
Sleeping
Sleeping
gera commited on
Commit ·
90693de
1
Parent(s): 30dadf4
gr.State() works different local and in hf?
Browse files
app.py
CHANGED
|
@@ -28,7 +28,7 @@ class EventHandler(openai.AssistantEventHandler):
|
|
| 28 |
print(f"\n{output.logs}", flush=True)
|
| 29 |
|
| 30 |
def chat(user_message, history, state):
|
| 31 |
-
if not state['user']:
|
| 32 |
gr.Warning("You need to authenticate first")
|
| 33 |
yield
|
| 34 |
else:
|
|
|
|
| 28 |
print(f"\n{output.logs}", flush=True)
|
| 29 |
|
| 30 |
def chat(user_message, history, state):
|
| 31 |
+
if (state is None) or (not state['user']):
|
| 32 |
gr.Warning("You need to authenticate first")
|
| 33 |
yield
|
| 34 |
else:
|