Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -27,6 +27,18 @@ MODELS = {
|
|
27 |
USER_PFP = "user.png" # Hugging Face user avatar
|
28 |
AI_PFP = "ai_pfp.png" # Replace with the path to your AI's image or a URL
|
29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
# Custom CSS for blue sliders and button
|
31 |
st.markdown(
|
32 |
"""
|
@@ -56,17 +68,6 @@ class AtlasInferenceApp:
|
|
56 |
if "chat_history" not in st.session_state:
|
57 |
st.session_state.chat_history = []
|
58 |
|
59 |
-
st.set_page_config(
|
60 |
-
page_title="Atlas Model Inference",
|
61 |
-
page_icon="π¦ ",
|
62 |
-
layout="wide",
|
63 |
-
menu_items={
|
64 |
-
'Get Help': 'https://huggingface.co/collections/Spestly/athena-1-67623e58bfaadd3c2fcffb86',
|
65 |
-
'Report a bug': 'https://huggingface.co/Spestly/Athena-1-1.5B/discussions/new',
|
66 |
-
'About': 'Athena Model Inference Platform'
|
67 |
-
}
|
68 |
-
)
|
69 |
-
|
70 |
def clear_memory(self):
|
71 |
"""Optimize memory management for CPU inference"""
|
72 |
if torch.cuda.is_available():
|
|
|
27 |
USER_PFP = "user.png" # Hugging Face user avatar
|
28 |
AI_PFP = "ai_pfp.png" # Replace with the path to your AI's image or a URL
|
29 |
|
30 |
+
# Set page config (must be called only once and before any other Streamlit commands)
|
31 |
+
st.set_page_config(
|
32 |
+
page_title="Atlas Model Inference",
|
33 |
+
page_icon="π¦ ",
|
34 |
+
layout="wide",
|
35 |
+
menu_items={
|
36 |
+
'Get Help': 'https://huggingface.co/collections/Spestly/athena-1-67623e58bfaadd3c2fcffb86',
|
37 |
+
'Report a bug': 'https://huggingface.co/Spestly/Athena-1-1.5B/discussions/new',
|
38 |
+
'About': 'Athena Model Inference Platform'
|
39 |
+
}
|
40 |
+
)
|
41 |
+
|
42 |
# Custom CSS for blue sliders and button
|
43 |
st.markdown(
|
44 |
"""
|
|
|
68 |
if "chat_history" not in st.session_state:
|
69 |
st.session_state.chat_history = []
|
70 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
def clear_memory(self):
|
72 |
"""Optimize memory management for CPU inference"""
|
73 |
if torch.cuda.is_available():
|