Spaces:
Paused
Paused
Nicholas Bumgarner commited on
Commit ·
8f7952f
1
Parent(s): b918c0d
Support both phoenix and mixer engines in chat
Browse files
app.py
CHANGED
|
@@ -366,9 +366,10 @@ def phox_chat(message, history):
|
|
| 366 |
return "Engine not initialized. Please wait for startup."
|
| 367 |
|
| 368 |
with _state_lock:
|
| 369 |
-
|
| 370 |
-
|
| 371 |
-
|
|
|
|
| 372 |
|
| 373 |
if _tokenizer is None:
|
| 374 |
return "Tokenizer not loaded."
|
|
|
|
| 366 |
return "Engine not initialized. Please wait for startup."
|
| 367 |
|
| 368 |
with _state_lock:
|
| 369 |
+
engine_running = (_phoenix_proc is not None and _phoenix_proc.poll() is None) or \
|
| 370 |
+
(_mixer_proc is not None and _mixer_proc.poll() is None)
|
| 371 |
+
if not engine_running:
|
| 372 |
+
return "Engine not running. Please click 'Start Engine' or 'Start Mixer' first."
|
| 373 |
|
| 374 |
if _tokenizer is None:
|
| 375 |
return "Tokenizer not loaded."
|