Spaces:
Sleeping
Sleeping
Sahil Seemant commited on
Commit ·
68a7bfa
1
Parent(s): 7e69116
Fix Streamlit set_page_config order and print specific ImportError
Browse files- chat_gui.py +4 -3
chat_gui.py
CHANGED
|
@@ -4,6 +4,8 @@ import gc
|
|
| 4 |
import re
|
| 5 |
import os
|
| 6 |
|
|
|
|
|
|
|
| 7 |
# Check for MLX support (Apple Silicon ONLY)
|
| 8 |
try:
|
| 9 |
import mlx.core as mx
|
|
@@ -23,10 +25,9 @@ except (ImportError, ModuleNotFoundError):
|
|
| 23 |
TextIteratorStreamer
|
| 24 |
)
|
| 25 |
from peft import PeftModel
|
| 26 |
-
except ImportError:
|
| 27 |
-
st.error("Missing cloud dependencies. Please check requirements.txt")
|
| 28 |
|
| 29 |
-
st.set_page_config(page_title="LLM Alignment Lab", layout="centered")
|
| 30 |
|
| 31 |
# --- UI State ---
|
| 32 |
if "messages" not in st.session_state:
|
|
|
|
| 4 |
import re
|
| 5 |
import os
|
| 6 |
|
| 7 |
+
st.set_page_config(page_title="LLM Alignment Lab", layout="centered")
|
| 8 |
+
|
| 9 |
# Check for MLX support (Apple Silicon ONLY)
|
| 10 |
try:
|
| 11 |
import mlx.core as mx
|
|
|
|
| 25 |
TextIteratorStreamer
|
| 26 |
)
|
| 27 |
from peft import PeftModel
|
| 28 |
+
except ImportError as e:
|
| 29 |
+
st.error(f"Missing cloud dependencies: {e}. Please check requirements.txt")
|
| 30 |
|
|
|
|
| 31 |
|
| 32 |
# --- UI State ---
|
| 33 |
if "messages" not in st.session_state:
|