Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -18,7 +18,7 @@ def load_model():
|
|
| 18 |
try:
|
| 19 |
if not os.path.exists(MODEL_PATH):
|
| 20 |
model = AutoModelForCausalLM.from_pretrained(
|
| 21 |
-
MODEL_NAME, token=TOKEN, trust_remote_code=True, torch_dtype=torch.bfloat16
|
| 22 |
)
|
| 23 |
tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME, token=TOKEN)
|
| 24 |
model.save_pretrained(MODEL_PATH)
|
|
@@ -137,4 +137,4 @@ if st.button("🧹 Clear Chat"):
|
|
| 137 |
with st.spinner("Clearing chat history..."):
|
| 138 |
st.session_state.chat_history = []
|
| 139 |
st.success("✅ Chat history cleared!")
|
| 140 |
-
st.experimental_rerun()
|
|
|
|
| 18 |
try:
|
| 19 |
if not os.path.exists(MODEL_PATH):
|
| 20 |
model = AutoModelForCausalLM.from_pretrained(
|
| 21 |
+
MODEL_NAME, token=TOKEN, trust_remote_code=True, torch_dtype=torch.bfloat16
|
| 22 |
)
|
| 23 |
tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME, token=TOKEN)
|
| 24 |
model.save_pretrained(MODEL_PATH)
|
|
|
|
| 137 |
with st.spinner("Clearing chat history..."):
|
| 138 |
st.session_state.chat_history = []
|
| 139 |
st.success("✅ Chat history cleared!")
|
| 140 |
+
st.experimental_rerun()
|